projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d711ea2
)
basic/util.c fopen_temporary(): close fd if failed
author
cee1
<fykcee1@gmail.com>
Thu, 9 Jul 2015 05:52:16 +0000
(13:52 +0800)
committer
Daniel Mack
<daniel@zonque.org>
Thu, 9 Jul 2015 14:41:23 +0000
(10:41 -0400)
src/basic/util.c
patch
|
blob
|
history
diff --git
a/src/basic/util.c
b/src/basic/util.c
index
e4e302a
..
c88cd1d
100644
(file)
--- a/
src/basic/util.c
+++ b/
src/basic/util.c
@@
-2535,6
+2535,7
@@
int fopen_temporary(const char *path, FILE **_f, char **_temp_path) {
if (!f) {
unlink(t);
free(t);
+ safe_close(fd);
return -errno;
}