Skip to content

Commit 5893df0

Browse files
committed
Fix a small file descriptor leak in Settings_write()
1 parent 9a32590 commit 5893df0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎Settings.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ int Settings_write(const Settings* this, bool onCrash) {
660660
}
661661
fp = fdopen(fdtmp, "w");
662662
if (!fp) {
663+
close(fdtmp);
663664
free(tmpFilename);
664665
return -errno;
665666
}

0 commit comments

Comments
 (0)