@matheusbsbs / matheus-bagliano / commits / 5d8ee9ceb8
Fork 0

Release config lock if the regex is invalid

Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Pavel Roskin committed May 7, 2006 at 17:36 UTC 5d8ee9ceb8912c83336191d32b8898943b8944b8
1 file changed +2
config.c
+2
@@ -514,6 +514,8 @@ int git_config_set_multivar(const char* key, const char* value,
514 fprintf(stderr, "Invalid pattern: %s\n",
515 value_regex);
516 free(store.value_regex);
517 + close(fd);
518 + unlink(lock_file);
519 ret = 6;
520 goto out_free;
521 }