projects
/
qemu-gpiodev
/
libfuse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46f1ac6
)
Don't close -1 fd in fuse_chan_destroy()
author
Miklos Szeredi
<mszeredi@suse.cz>
Mon, 26 Aug 2013 09:33:33 +0000
(11:33 +0200)
committer
Miklos Szeredi
<mszeredi@suse.cz>
Mon, 26 Aug 2013 09:33:33 +0000
(11:33 +0200)
Valgrind warns on close(-1). So don't do this (happens if fuse_chan_clearfd()
was called on the channel).
lib/fuse_lowlevel.c
patch
|
blob
|
history
diff --git
a/lib/fuse_lowlevel.c
b/lib/fuse_lowlevel.c
index c88b4a74589ac0dfab439010589f1014cf84a479..0f1c3d3f8c63ab96a1b93ff7711dc0bf3e71140b 100755
(executable)
--- a/
lib/fuse_lowlevel.c
+++ b/
lib/fuse_lowlevel.c
@@
-224,7
+224,9
@@
static int fuse_chan_send(struct fuse_chan *ch, const struct iovec iov[],
void fuse_chan_close(struct fuse_chan *ch)
{
- close(fuse_chan_fd(ch));
+ int fd = fuse_chan_fd(ch);
+ if (fd != -1)
+ close(fd);
}