1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-02 08:58:33 +03:00

s3-rpc_server: Duplicate the pipe name.

This commit is contained in:
Andreas Schneider 2011-07-21 11:21:30 +02:00 committed by Andreas Schneider
parent 3a43ef52db
commit 19288f9784

View File

@ -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;