diff --git a/config.c b/config.c index 87fb22041e..11d65f8c70 100644 --- a/config.c +++ b/config.c @@ -514,6 +514,8 @@ int git_config_set_multivar(const char* key, const char* value, fprintf(stderr, "Invalid pattern: %s\n", value_regex); free(store.value_regex); + close(fd); + unlink(lock_file); ret = 6; goto out_free; }