/
uis
/
git
/
x
/
uis
/
git
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
33f2c4f
54d160e
)
Merge branch 'ss/fix-config-fd-leak'
author
Junio C Hamano
<gitster@pobox.com>
Wed, 26 Aug 2015 22:45:30 +0000
(15:45 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 26 Aug 2015 22:45:30 +0000
(15:45 -0700)
* ss/fix-config-fd-leak:
config: close config file handle in case of error
1
2
config.c
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
config.c
index
a34b850
,
83caa25
..
c027e6f
---
1
/
config.c
---
2
/
config.c
+++ b/
config.c
@@@
-2065,10
-2065,11
+2065,11
@@@
int git_config_set_multivar_in_file(con
goto out_free;
}
close(in_fd);
+ in_fd = -1;
- if (chmod(
lock->filename.buf
, st.st_mode & 07777) < 0) {
+ if (chmod(
get_lock_file_path(lock)
, st.st_mode & 07777) < 0) {
error("chmod on %s failed: %s",
-
lock->filename.buf
, strerror(errno));
+
get_lock_file_path(lock)
, strerror(errno));
ret = CONFIG_NO_WRITE;
goto out_free;
}