Skip to content

Commit

Permalink
Release config lock if the regex is invalid
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Pavel Roskin authored and Junio C Hamano committed May 7, 2006
1 parent 245f102 commit 5d8ee9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5d8ee9c

Please sign in to comment.