From e6b7c350c1f88c7b92e012be03cb3af207ff4187 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Sep 2006 17:39:21 +0000 Subject: r18487: Add NULL checks (This used to be commit 3df11307f8ca05e4f7182522d835911f0768e9eb) --- source3/rpc_server/srv_dfs_nt.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/rpc_server/srv_dfs_nt.c') diff --git a/source3/rpc_server/srv_dfs_nt.c b/source3/rpc_server/srv_dfs_nt.c index 4a5aad58b9..f3b6d8af88 100644 --- a/source3/rpc_server/srv_dfs_nt.c +++ b/source3/rpc_server/srv_dfs_nt.c @@ -170,6 +170,9 @@ static BOOL init_reply_dfs_info_1(TALLOC_CTX *mem_ctx, struct junction_map* j, s 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 @@ static BOOL init_reply_dfs_info_2(TALLOC_CTX *mem_ctx, struct junction_map* j, s { 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 @@ static BOOL init_reply_dfs_info_3(TALLOC_CTX *mem_ctx, struct junction_map* j, s 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; -- cgit