diff options
author | cee1 <fykcee1@gmail.com> | 2015-07-09 07:52:16 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-07-09 16:41:23 +0200 |
commit | ac5213569cd670131e2120f6f244108080818d6b (patch) | |
tree | 8273ced62aed743e820dba52a29f99feb8c9ce32 /src/basic/util.c | |
parent | Merge pull request #529 from dvdhrm/bus-slot-description (diff) | |
download | systemd-ac5213569cd670131e2120f6f244108080818d6b.tar.xz systemd-ac5213569cd670131e2120f6f244108080818d6b.zip |
basic/util.c fopen_temporary(): close fd if failed
Diffstat (limited to 'src/basic/util.c')
-rw-r--r-- | src/basic/util.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/util.c b/src/basic/util.c index e4e302ae3d..c88cd1d38a 100644 --- 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; } |