]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
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 4c9ee17b95ba9554f00dfb77966bb34255bdd111..b5956495eeebf164638d9613102faf81e503a4a5 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);