summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-09-13 17:39:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:44 -0500
commite6b7c350c1f88c7b92e012be03cb3af207ff4187 (patch)
tree08cc7c4bcd3e4f369d036ffa9740488fa7df1891
parent1f0b2e84d71e2a7b06de288dbb54d2f12b6ca0e1 (diff)
downloadsamba-e6b7c350c1f88c7b92e012be03cb3af207ff4187.tar.gz
samba-e6b7c350c1f88c7b92e012be03cb3af207ff4187.tar.bz2
samba-e6b7c350c1f88c7b92e012be03cb3af207ff4187.zip
r18487: Add NULL checks
(This used to be commit 3df11307f8ca05e4f7182522d835911f0768e9eb)
-rw-r--r--source3/rpc_server/srv_dfs_nt.c8
1 files changed, 8 insertions, 0 deletions
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;