summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-10-01 10:28:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-01 20:48:59 (GMT)
commite831855ecc6783bfe4b681017349c623fc2fe8c8 (patch)
tree26e8bfff4cff9398b1c49b91dd43a013ed08edc6 /config.c
parent32c3ec258e8b12ba29ce591b09a300621dba9b3a (diff)
downloadgit-e831855ecc6783bfe4b681017349c623fc2fe8c8.zip
git-e831855ecc6783bfe4b681017349c623fc2fe8c8.tar.gz
git-e831855ecc6783bfe4b681017349c623fc2fe8c8.tar.bz2
git_config_set_multivar_in_file(): avoid call to rollback_lock_file()
After commit_lock_file() is called, then the lock_file object is necessarily either committed or rolled back. So there is no need to call rollback_lock_file() again in either of these cases. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/config.c b/config.c
index a677eb6..123ed29 100644
--- a/config.c
+++ b/config.c
@@ -2083,6 +2083,7 @@ int git_config_set_multivar_in_file(const char *config_filename,
if (commit_lock_file(lock) < 0) {
error("could not commit config file %s", config_filename);
ret = CONFIG_NO_WRITE;
+ lock = NULL;
goto out_free;
}