1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00

[CIFS] Fix mem leak on dfs referral

Signed-off-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Steve French 2008-03-22 22:57:44 +00:00
parent 8b1327f6ed
commit 04b6e6ec1a

View file

@ -211,7 +211,10 @@ try_again_CIFSSMBUnixQPathInfo:
if (rc) { if (rc) {
if (rc == -EREMOTE && !is_dfs_referral) { if (rc == -EREMOTE && !is_dfs_referral) {
is_dfs_referral = true; 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 try_again_CIFSSMBUnixQPathInfo;
} }
goto cgiiu_exit; goto cgiiu_exit;
@ -422,7 +425,10 @@ try_again_CIFSSMBQPathInfo:
if (rc) { if (rc) {
if (rc == -EREMOTE && !is_dfs_referral) { if (rc == -EREMOTE && !is_dfs_referral) {
is_dfs_referral = true; 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 try_again_CIFSSMBQPathInfo;
} }
goto cgii_exit; goto cgii_exit;