From dba9185999dfa35161d4c810735df0ab3fde5104 Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Mon, 7 Mar 2011 15:40:59 +0200 Subject: Check the 'mtablock' for negative value --- util/fusermount.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'util') 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, -- cgit v1.2.3