1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

rpc: Don't crash if npa_accept fails

We can only rely on session_info_transport to be filled correctly upon
success of the accept_existing_recv function

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2019-04-02 16:37:39 +02:00 committed by Jeremy Allison
parent 7a413a6dab
commit 2a926231ab

View File

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