Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Commit 50e28dd

Browse files
committed
only unlink if we used g_tmpfile
1 parent ecfcca3 commit 50e28dd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

util.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ gint g_unlinked_tmp(GError **error)
160160
// O_TMPFILE can be defined but still fail on some systems.
161161
if (fd == -1) {
162162
fd = g_file_open_tmp(NULL, &filename, error);
163-
}
164163

165-
if (fd != -1) {
166-
g_unlink(filename);
167-
g_free(filename);
164+
if (fd != -1) {
165+
g_unlink(filename);
166+
g_free(filename);
167+
}
168168
}
169169
return fd;
170170
}

0 commit comments

Comments
 (0)