mount: Fix po_join() call site in nfs_try_mount_v4()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 3 Nov 2009 16:19:08 +0000 (11:19 -0500)
committerSteve Dickson <steved@redhat.com>
Tue, 3 Nov 2009 16:19:08 +0000 (11:19 -0500)
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>
utils/mount/stropts.c

index 4c9ee17..b595649 100644 (file)
@@ -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);