Skip to content

Commit e831855

Browse files
mhaggergitster
authored andcommitted
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>
1 parent 32c3ec2 commit e831855

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,6 +2083,7 @@ int git_config_set_multivar_in_file(const char *config_filename,
20832083
if (commit_lock_file(lock) < 0) {
20842084
error("could not commit config file %s", config_filename);
20852085
ret = CONFIG_NO_WRITE;
2086+
lock = NULL;
20862087
goto out_free;
20872088
}
20882089

0 commit comments

Comments
 (0)