From: Steve Dickson Date: Wed, 16 Jan 2008 16:50:41 +0000 (-0500) Subject: add_mtab() calls unlock_mtab() twice in one of its error exit paths. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=fa087f2dece4b1d322d951e9353e8ab93208194d;p=nfs-utils.git add_mtab() calls unlock_mtab() twice in one of its error exit paths. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- diff --git a/utils/mount/mount.c b/utils/mount/mount.c index 6ae6b79..cc00bf7 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -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;