diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c index 0230d73abb2..f0870c88174 100644 --- a/source3/rpc_server/rpc_server.c +++ b/source3/rpc_server/rpc_server.c @@ -357,8 +357,6 @@ static void named_pipe_accept_done(struct tevent_req *subreq) &npc->local_server_name, &session_info_transport); - npc->session_info = talloc_move(npc, &session_info_transport->session_info); - TALLOC_FREE(subreq); if (ret != 0) { DEBUG(2, ("Failed to accept named pipe connection! (%s)\n", @@ -367,6 +365,9 @@ static void named_pipe_accept_done(struct tevent_req *subreq) return; } + npc->session_info = talloc_move( + npc, &session_info_transport->session_info); + ret = make_server_pipes_struct(npc, npc->msg_ctx, npc->pipe_name, NCACN_NP,