summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-07-21 11:21:30 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-07-21 18:40:23 +0200
commit19288f978484ca0c826535083bcbefddcbd93346 (patch)
treeb3b52ef42769c8421685f174c950e66fb6dac55d
parent3a43ef52db8e85c9479e61853dfed0fa371c4fa4 (diff)
downloadsamba-19288f978484ca0c826535083bcbefddcbd93346.tar.gz
samba-19288f978484ca0c826535083bcbefddcbd93346.tar.bz2
samba-19288f978484ca0c826535083bcbefddcbd93346.zip
s3-rpc_server: Duplicate the pipe name.
-rw-r--r--source3/rpc_server/rpc_server.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index a489cf13c0..f603b582c8 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -355,7 +355,14 @@ static void named_pipe_accept_function(struct tevent_context *ev_ctx,
close(fd);
return;
}
- npc->pipe_name = pipe_name;
+
+ npc->pipe_name = talloc_strdup(npc, pipe_name);
+ if (npc->pipe_name == NULL) {
+ DEBUG(0, ("Out of memory!\n"));
+ TALLOC_FREE(npc);
+ close(fd);
+ return;
+ }
npc->ev = ev_ctx;
npc->msg_ctx = msg_ctx;