diff options
author | Laszlo Papp <ext-laszlo.papp@nokia.com> | 2011-03-07 15:40:59 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2011-03-30 19:34:59 +0200 |
commit | dba9185999dfa35161d4c810735df0ab3fde5104 (patch) | |
tree | 7ac2f6feccbd86caf31dacb7da62ae5ac5a264bf /util | |
parent | 20c31c48b4bb2c1d8c8d1139843872c18ed3865d (diff) |
Check the 'mtablock' for negative value
Diffstat (limited to 'util')
-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, |