diff options
author | Steve French <sfrench@us.ibm.com> | 2008-03-22 18:57:44 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-03-22 18:57:44 -0400 |
commit | 04b6e6ec1a9340ab77637cae9b51b984d9d706d8 (patch) | |
tree | 50d555030ba63ca2ca2b6a889a412b0b9a5943ef /fs/cifs | |
parent | 8b1327f6ed957030a64ccdb17131955bfea2d3fe (diff) |
[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.c | 10 |
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: | |||
211 | if (rc) { | 211 | if (rc) { |
212 | if (rc == -EREMOTE && !is_dfs_referral) { | 212 | if (rc == -EREMOTE && !is_dfs_referral) { |
213 | is_dfs_referral = true; | 213 | is_dfs_referral = true; |
214 | full_path = search_path; | 214 | if (full_path != search_path) { |
215 | kfree(full_path); | ||
216 | full_path = search_path; | ||
217 | } | ||
215 | goto try_again_CIFSSMBUnixQPathInfo; | 218 | goto try_again_CIFSSMBUnixQPathInfo; |
216 | } | 219 | } |
217 | goto cgiiu_exit; | 220 | goto cgiiu_exit; |
@@ -422,7 +425,10 @@ try_again_CIFSSMBQPathInfo: | |||
422 | if (rc) { | 425 | if (rc) { |
423 | if (rc == -EREMOTE && !is_dfs_referral) { | 426 | if (rc == -EREMOTE && !is_dfs_referral) { |
424 | is_dfs_referral = true; | 427 | is_dfs_referral = true; |
425 | full_path = search_path; | 428 | if (full_path != search_path) { |
429 | kfree(full_path); | ||
430 | full_path = search_path; | ||
431 | } | ||
426 | goto try_again_CIFSSMBQPathInfo; | 432 | goto try_again_CIFSSMBQPathInfo; |
427 | } | 433 | } |
428 | goto cgii_exit; | 434 | goto cgii_exit; |