aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-03-22 22:57:44 +0000
committerSteve French <sfrench@us.ibm.com>2008-03-22 22:57:44 +0000
commit04b6e6ec1a9340ab77637cae9b51b984d9d706d8 (patch)
tree50d555030ba63ca2ca2b6a889a412b0b9a5943ef /fs/cifs
parent8b1327f6ed957030a64ccdb17131955bfea2d3fe (diff)
downloadkernel_samsung_smdk4412-04b6e6ec1a9340ab77637cae9b51b984d9d706d8.zip
kernel_samsung_smdk4412-04b6e6ec1a9340ab77637cae9b51b984d9d706d8.tar.gz
kernel_samsung_smdk4412-04b6e6ec1a9340ab77637cae9b51b984d9d706d8.tar.bz2
[CIFS] Fix mem leak on dfs referral
Signed-off-by: Igor Mammedov <niallain@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-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 7e4c244..bc673c8 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;