Skip to content

Commit 66b33f6

Browse files
committed
bin/xbps-rindex: don't try to close -1
1 parent ae3a608 commit 66b33f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/xbps-rindex/repoflush.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ repodata_flush(const char *repodir,
225225
archive_write_close(ar);
226226
archive_write_free(ar);
227227
}
228-
close(fd);
228+
if (fd != -1)
229+
close(fd);
229230
unlink(tmp);
230231
return r;
231232
}

0 commit comments

Comments
 (0)