This commit is contained in:
Maxim Devaev
2022-07-20 13:04:18 +03:00
parent 1c1e3b0875
commit 54af47fc43
2 changed files with 2 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ static void _MemsinkObject_destroy_internals(_MemsinkObject *self) {
us_memsink_shared_unmap(self->mem);
self->mem = NULL;
}
if (self->fd > 0) {
if (self->fd >= 0) {
close(self->fd);
self->fd = -1;
}