X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fmount.c;h=442ce0ea034bcefd025b0dad6cd1faac248621a7;hp=171c714bf2350ec36d0c228aa790098791d9c1c6;hb=46ef88e0f7ec187e4448230efa6baf698643d3f9;hpb=3b55934b9baefecee17aefc3ea139e261a4b03b8 diff --git a/utils/mount/mount.c b/utils/mount/mount.c index 171c714..442ce0e 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -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; } @@ -308,7 +309,7 @@ static void mount_error(char *mntpnt, char *node) fprintf(stderr, "%s: %s\n", progname, strerror(errno)); } } -static int chk_mountpoint(mount_point) +static int chk_mountpoint(char *mount_point) { struct stat sb;