add_mtab() calls unlock_mtab() twice in one of its error exit paths.
authorSteve Dickson <steved@redhat.com>
Wed, 16 Jan 2008 16:50:41 +0000 (11:50 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 16 Jan 2008 16:50:41 +0000 (11:50 -0500)
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/mount.c

index 6ae6b79..cc00bf7 100644 (file)
@@ -246,7 +246,6 @@ static int add_mtab(char *spec, char *mount_point, char *fstype,
        lock_mtab();
 
        if ((mtab = setmntent(MOUNTED, "a+")) == NULL) {
-               unlock_mtab();
                nfs_error(_("Can't open mtab: %s"),
                                strerror(errno));
                goto fail_unlock;