rpc_server3: Fix a memleak for internal pipes
authorVolker Lendecke <vl@samba.org>
Tue, 23 Mar 2021 16:06:15 +0000 (17:06 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 31 Mar 2021 12:14:01 +0000 (12:14 +0000)
state->call should not be talloc'ed off a long-lived context

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14675
CI: https://gitlab.com/samba-team/samba/-/merge_requests/1861

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Mar 31 12:14:01 UTC 2021 on sn-devel-184

source3/rpc_server/rpc_ncacn_np.c

index 598efd1f33976c5ce03fd0e4fdd1fa8c47fe8804..8cd84fee8b4fc4ab7700898709c61ca8a960959b 100644 (file)
@@ -475,7 +475,7 @@ static struct tevent_req *rpcint_bh_raw_call_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       state->call = talloc_zero(hs->conn, struct dcesrv_call_state);
+       state->call = talloc_zero(state, struct dcesrv_call_state);
        if (tevent_req_nomem(state->call, req)) {
                return tevent_req_post(req, ev);
        }