diff options
-rw-r--r-- | source3/rpc_server/rpc_server.c | 9 |
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; |