diff options
-rw-r--r-- | lib/fuse_kern_chan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/fuse_kern_chan.c b/lib/fuse_kern_chan.c index 5f77bbf..4a9beb8 100644 --- a/lib/fuse_kern_chan.c +++ b/lib/fuse_kern_chan.c @@ -77,7 +77,10 @@ static int fuse_kern_chan_send(struct fuse_chan *ch, const struct iovec iov[], static void fuse_kern_chan_destroy(struct fuse_chan *ch) { - close(fuse_chan_fd(ch)); + int fd = fuse_chan_fd(ch); + + if (fd != -1) + close(fd); } #define MIN_BUFSIZE 0x21000 |