summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2009-11-03 11:19:08 -0500
committerSteve Dickson <steved@redhat.com>2009-11-03 11:19:08 -0500
commit97731f394c6b83ed7e5c3923278bbe98ee130bee (patch)
treee36b048261859400680c5137d2c96dd04d67b78f
parente4328bb8d13ae6dda33308557e6bbb352d5674bb (diff)
downloadnfs-utils-97731f394c6b83ed7e5c3923278bbe98ee130bee.tar.gz
nfs-utils-97731f394c6b83ed7e5c3923278bbe98ee130bee.tar.xz
nfs-utils-97731f394c6b83ed7e5c3923278bbe98ee130bee.zip
mount: Fix po_join() call site in nfs_try_mount_v4()
Make sure the copied options string is freed in case po_join() fails. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--utils/mount/stropts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index 4c9ee17..b595649 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -621,12 +621,13 @@ static int nfs_try_mount_v4(struct nfsmount_info *mi)
errno = EINVAL;
goto out_fail;
}
+
/*
* Update option string to be recorded in /etc/mtab.
*/
if (po_join(options, mi->extra_opts) == PO_FAILED) {
errno = ENOMEM;
- return 0;
+ goto out_fail;
}
result = nfs_sys_mount(mi, options);