1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Fix dfs_Enum: In form_junctions, correctly check for malloc failure

This commit is contained in:
Volker Lendecke 2008-05-05 12:45:12 +02:00
parent e206ffb856
commit 1b1614c326

View File

@ -1459,7 +1459,7 @@ static int form_junctions(TALLOC_CTX *ctx,
*/
jucn[cnt].service_name = talloc_strdup(ctx,service_name);
jucn[cnt].volume_name = talloc_strdup(ctx, "");
if (!jucn[cnt].service_name || jucn[cnt].volume_name) {
if (!jucn[cnt].service_name || !jucn[cnt].volume_name) {
goto out;
}
jucn[cnt].referral_count = 1;