summaryrefslogtreecommitdiff
path: root/fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fd.c')
-rw-r--r--fd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fd.c b/fd.c
index 6ce4aec..9ce6bae 100644
--- a/fd.c
+++ b/fd.c
@@ -86,6 +86,8 @@ fd_close(struct fd *fd)
if(--fd->ref == 0){
if(fd->type == FD_PIPE){
pipe_close(fd->pipe, fd->writeable);
+ } else if(fd->type == FD_FILE){
+ idecref(fd->ip);
} else {
panic("fd_close");
}