aboutsummaryrefslogtreecommitdiff
path: root/lib/helper.c
diff options
context:
space:
mode:
authorGravatar Laszlo Papp <ext-laszlo.papp@nokia.com>2011-03-07 14:49:36 +0200
committerGravatar Miklos Szeredi <mszeredi@suse.cz>2011-03-30 19:34:59 +0200
commit20c31c48b4bb2c1d8c8d1139843872c18ed3865d (patch)
tree5adb0bb816fe53d5c9e31fa381e444737872422c /lib/helper.c
parentdb5d46976b35462cd953e2d4b2e3707562327c4f (diff)
Fix a potential null pointer dereference issue
Diffstat (limited to 'lib/helper.c')
-rw-r--r--lib/helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/helper.c b/lib/helper.c
index 81eedec..0ba6d4f 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -227,7 +227,8 @@ static void fuse_unmount_common(const char *mountpoint, struct fuse_chan *ch)
{
int fd = ch ? fuse_chan_fd(ch) : -1;
fuse_kern_unmount(mountpoint, fd);
- fuse_chan_destroy(ch);
+ if (ch)
+ fuse_chan_destroy(ch);
}
void fuse_unmount(const char *mountpoint, struct fuse_chan *ch)