summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2006-05-07 21:36:12 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-07 22:31:06 (GMT)
commit5d8ee9ceb8912c83336191d32b8898943b8944b8 (patch)
tree7eb67e5f1ed36d10928e1566f3e8bfb9fb0fe30f
parent245f1029d674b95d63b5faea2269f98d28b3adb2 (diff)
downloadgit-5d8ee9ceb8912c83336191d32b8898943b8944b8.zip
git-5d8ee9ceb8912c83336191d32b8898943b8944b8.tar.gz
git-5d8ee9ceb8912c83336191d32b8898943b8944b8.tar.bz2
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>
-rw-r--r--config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.c b/config.c
index 87fb220..11d65f8 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;
}