diff options
author | Daniel Mack <github@zonque.org> | 2015-07-11 13:35:50 -0400 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-07-11 13:35:50 -0400 |
commit | 6f9d58d87fa2b728c1d08f74e9f17c581513516c (patch) | |
tree | 451422e0456bf56b4f2b4f004991cbc223b6cbc0 /src/basic | |
parent | 0dc705bee2dddfa093b47e5459f2c6dac37033c0 (diff) | |
parent | 64ee7ab46211307cea338f35694c802f7abc313f (diff) |
Merge pull request #551 from poettering/fopen-temporary-noerrno
util: make sure we don't clobber errno in error path
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/util.c b/src/basic/util.c index c88cd1d38a..13a67e9ab8 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -2533,7 +2533,7 @@ int fopen_temporary(const char *path, FILE **_f, char **_temp_path) { f = fdopen(fd, "we"); if (!f) { - unlink(t); + unlink_noerrno(t); free(t); safe_close(fd); return -errno; |