Author: jelmer Date: 2006-09-13 17:39:21 +0000 (Wed, 13 Sep 2006) New Revision: 18487
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18487 Log: Add NULL checks Modified: branches/SAMBA_3_0/source/rpc_server/srv_dfs_nt.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_server/srv_dfs_nt.c =================================================================== --- branches/SAMBA_3_0/source/rpc_server/srv_dfs_nt.c 2006-09-13 17:38:49 UTC (rev 18486) +++ branches/SAMBA_3_0/source/rpc_server/srv_dfs_nt.c 2006-09-13 17:39:21 UTC (rev 18487) @@ -170,6 +170,9 @@ dfs1->path = talloc_asprintf(mem_ctx, "\\\\%s\\%s\\%s", global_myname(), j->service_name, j->volume_name); + if (dfs1->path == NULL) + return False; + DEBUG(5,("init_reply_dfs_info_1: initing entrypath: %s\n",dfs1->path)); return True; } @@ -178,6 +181,8 @@ { dfs2->path = talloc_asprintf(mem_ctx, "\\\\%s\\%s\\%s", global_myname(), j->service_name, j->volume_name); + if (dfs2->path == NULL) + return False; dfs2->comment = talloc_strdup(mem_ctx, j->comment); dfs2->state = 1; /* set up state of dfs junction as OK */ dfs2->num_stores = j->referral_count; @@ -194,6 +199,9 @@ dfs3->path = talloc_asprintf(mem_ctx, "\\\\%s\\%s\\%s", global_myname(), j->service_name, j->volume_name); + if (dfs3->path == NULL) + return False; + dfs3->comment = talloc_strdup(mem_ctx, j->comment); dfs3->state = 1; dfs3->num_stores = j->referral_count;