diff --git a/sys/fs/vfs/file.c b/sys/fs/vfs/file.c index 48a7587..a3bd30d 100644 --- a/sys/fs/vfs/file.c +++ b/sys/fs/vfs/file.c @@ -537,8 +537,12 @@ spinLock(&fdTable_lock); kprintf("[%s:%i]", __FILE__, __LIME__); + for (tmpFd = fdTable; tmpFd != 0x0; tmpFd = tmpFd->next) { if (tmpFd == fd) { + if (fd->res != 0x0) + fl_fclose(fd->res); + if (tmpFd->prev) tmpFd->prev->next = tmpFd->next; if (tmpFd->next)