basic/util.c fopen_temporary(): close fd if failed

This commit is contained in:
cee1
2015-07-09 10:41:23 -04:00
committed by Daniel Mack
parent d711ea2b95
commit ac5213569c
+1
View File
@@ -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;
}