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>
This commit is contained in:
parent
32c3ec258e
commit
e831855ecc
1
config.c
1
config.c
@ -2083,6 +2083,7 @@ int git_config_set_multivar_in_file(const char *config_filename,
|
|||||||
if (commit_lock_file(lock) < 0) {
|
if (commit_lock_file(lock) < 0) {
|
||||||
error("could not commit config file %s", config_filename);
|
error("could not commit config file %s", config_filename);
|
||||||
ret = CONFIG_NO_WRITE;
|
ret = CONFIG_NO_WRITE;
|
||||||
|
lock = NULL;
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user