Release config lock if the regex is invalid
authorPavel Roskin <proski@gnu.org>
Sun, 7 May 2006 21:36:12 +0000 (17:36 -0400)
committerJunio C Hamano <junkio@cox.net>
Sun, 7 May 2006 22:31:06 +0000 (15:31 -0700)
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
config.c

index 87fb220..11d65f8 100644 (file)
--- 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;
                        }