aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index fc44d316d0bb..f2486889b7bb 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2544,11 +2544,20 @@ remote_path_check:
2544 2544
2545 if (mount_data != mount_data_global) 2545 if (mount_data != mount_data_global)
2546 kfree(mount_data); 2546 kfree(mount_data);
2547
2547 mount_data = cifs_compose_mount_options( 2548 mount_data = cifs_compose_mount_options(
2548 cifs_sb->mountdata, full_path + 1, 2549 cifs_sb->mountdata, full_path + 1,
2549 referrals, &fake_devname); 2550 referrals, &fake_devname);
2550 kfree(fake_devname); 2551
2551 free_dfs_info_array(referrals, num_referrals); 2552 free_dfs_info_array(referrals, num_referrals);
2553 kfree(fake_devname);
2554 kfree(full_path);
2555
2556 if (IS_ERR(mount_data)) {
2557 rc = PTR_ERR(mount_data);
2558 mount_data = NULL;
2559 goto mount_fail_check;
2560 }
2552 2561
2553 if (tcon) 2562 if (tcon)
2554 cifs_put_tcon(tcon); 2563 cifs_put_tcon(tcon);
@@ -2556,8 +2565,6 @@ remote_path_check:
2556 cifs_put_smb_ses(pSesInfo); 2565 cifs_put_smb_ses(pSesInfo);
2557 2566
2558 cleanup_volume_info(&volume_info); 2567 cleanup_volume_info(&volume_info);
2559 FreeXid(xid);
2560 kfree(full_path);
2561 referral_walks_count++; 2568 referral_walks_count++;
2562 goto try_mount_again; 2569 goto try_mount_again;
2563 } 2570 }