Added missing unlock_mtab() call in the add_mtab()
authorSteve Dickson <steved@redhat.com>
Thu, 10 May 2007 20:02:15 +0000 (16:02 -0400)
committerNeil Brown <neilb@suse.de>
Mon, 16 Jul 2007 00:49:22 +0000 (10:49 +1000)
routine.

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/mount.c

index c163922..442ce0e 100644 (file)
@@ -185,6 +185,7 @@ int add_mtab(char *fsname, char *mount_point, char *fstype, int flags, char *opt
        lock_mtab();
 
         if ((mtab = setmntent(MOUNTED, "a+")) == NULL) {
+               unlock_mtab();
                fprintf(stderr, "Can't open " MOUNTED);
                return 1;
        }