diff --git a/config.c b/config.c index a677eb6c59..123ed29963 100644 --- a/config.c +++ b/config.c @@ -2083,6 +2083,7 @@ int git_config_set_multivar_in_file(const char *config_filename, if (commit_lock_file(lock) < 0) { error("could not commit config file %s", config_filename); ret = CONFIG_NO_WRITE; + lock = NULL; goto out_free; }