diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2009-11-03 11:19:08 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-11-03 11:19:08 -0500 |
commit | 97731f394c6b83ed7e5c3923278bbe98ee130bee (patch) | |
tree | e36b048261859400680c5137d2c96dd04d67b78f | |
parent | e4328bb8d13ae6dda33308557e6bbb352d5674bb (diff) | |
download | nfs-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.c | 3 |
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); |