From: Chuck Lever Date: Tue, 3 Nov 2009 16:19:08 +0000 (-0500) Subject: mount: Fix po_join() call site in nfs_try_mount_v4() X-Git-Tag: nfs-utils-1-2-1~2 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=97731f394c6b83ed7e5c3923278bbe98ee130bee;p=nfs-utils.git 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 Signed-off-by: Steve Dickson --- 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);