]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util: make sure we don't clobber errno in error path 551/head
authorLennart Poettering <lennart@poettering.net>
Sat, 11 Jul 2015 17:19:36 +0000 (14:19 -0300)
committerLennart Poettering <lennart@poettering.net>
Sat, 11 Jul 2015 17:19:36 +0000 (14:19 -0300)
src/basic/util.c

index c88cd1d38a350a04f18bc56c402ce17a195e30da..13a67e9ab84316b0015f971654a1f7d89625c943 100644 (file)
@@ -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;