From: Laszlo Papp Date: Mon, 7 Mar 2011 13:40:59 +0000 (+0200) Subject: Check the 'mtablock' for negative value X-Git-Tag: fuse_2_9_0~52 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=dba9185999dfa35161d4c810735df0ab3fde5104;p=qemu-gpiodev%2Flibfuse.git Check the 'mtablock' for negative value --- diff --git a/util/fusermount.c b/util/fusermount.c index c37e57b..85292fb 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -124,8 +124,10 @@ static int lock_umount(void) static void unlock_umount(int mtablock) { - lockf(mtablock, F_ULOCK, 0); - close(mtablock); + if (mtablock >= 0) { + lockf(mtablock, F_ULOCK, 0); + close(mtablock); + } } static int add_mount(const char *source, const char *mnt, const char *type,