Skip to content

Commit

Permalink
[CIFS] Fix mem leak on dfs referral
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Steve French committed Mar 22, 2008
1 parent 8b1327f commit 04b6e6e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fs/cifs/inode.c
Original file line number Diff line number Diff line change
@@ -211,7 +211,10 @@ int cifs_get_inode_info_unix(struct inode **pinode,
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 @@ int cifs_get_inode_info(struct inode **pinode,
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;

0 comments on commit 04b6e6e

Please sign in to comment.