summaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 7e4c24491729..bc673c8c1e6b 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -211,7 +211,10 @@ try_again_CIFSSMBUnixQPathInfo:
if (rc) {
if (rc == -EREMOTE && !is_dfs_referral) {
is_dfs_referral = true;
- full_path = search_path;
+ if (full_path != search_path) {
+ kfree(full_path);
+ full_path = search_path;
+ }
goto try_again_CIFSSMBUnixQPathInfo;
}
goto cgiiu_exit;
@@ -422,7 +425,10 @@ try_again_CIFSSMBQPathInfo:
if (rc) {
if (rc == -EREMOTE && !is_dfs_referral) {
is_dfs_referral = true;
- full_path = search_path;
+ if (full_path != search_path) {
+ kfree(full_path);
+ full_path = search_path;
+ }
goto try_again_CIFSSMBQPathInfo;
}
goto cgii_exit;