summaryrefslogtreecommitdiffstats
path: root/source/rpc_server/srv_dfs_nt.c
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
commit3df11307f8ca05e4f7182522d835911f0768e9eb (patch)
treed524cdfc42768a64c67fd64f0e6820ca76d750e7 /source/rpc_server/srv_dfs_nt.c
parent0f7e37ffc4759a4e29f63ab83f39ddb31c8240f6 (diff)
downloadsamba-3df11307f8ca05e4f7182522d835911f0768e9eb.tar.gz
samba-3df11307f8ca05e4f7182522d835911f0768e9eb.tar.xz
samba-3df11307f8ca05e4f7182522d835911f0768e9eb.zip
r18487: Add NULL checks
Diffstat (limited to 'source/rpc_server/srv_dfs_nt.c')
-rw-r--r--source/rpc_server/srv_dfs_nt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/rpc_server/srv_dfs_nt.c b/source/rpc_server/srv_dfs_nt.c
index 4a5aad58b91..f3b6d8af88c 100644
--- a/source/rpc_server/srv_dfs_nt.c
+++ b/source/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;