summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;