From: Laszlo Papp Date: Mon, 7 Mar 2011 12:49:36 +0000 (+0200) Subject: Fix a potential null pointer dereference issue X-Git-Tag: fuse_2_9_0~53 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=20c31c48b4bb2c1d8c8d1139843872c18ed3865d;p=qemu-gpiodev%2Flibfuse.git Fix a potential null pointer dereference issue --- 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)