diff options
-rw-r--r-- | util/fusermount.c | 6 |
1 files changed, 4 insertions, 2 deletions
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, |