From 090898de71ee0bb2d10cb4f227a37b2e4c83f2da Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 23 Nov 2005 00:51:24 +0000 Subject: r11871: fixed a problem volker found with the async bind code, and a callback destroying the dcerpc pipe (This used to be commit 0b91602fa4b9a8b40331d088bdaac76381eac7ef) --- source4/librpc/rpc/dcerpc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source4/librpc/rpc') diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 30c430dcba..2c90c62ef5 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -568,10 +568,12 @@ static void dcerpc_recv_data(struct dcerpc_connection *conn, DATA_BLOB *blob, NT case DCERPC_PKT_BIND_ACK: case DCERPC_PKT_BIND_NAK: dcerpc_bind_recv_data(conn, &pkt); + data_blob_free(blob); break; case DCERPC_PKT_ALTER_RESP: dcerpc_alter_recv_data(conn, &pkt); + data_blob_free(blob); break; default: @@ -579,8 +581,6 @@ static void dcerpc_recv_data(struct dcerpc_connection *conn, DATA_BLOB *blob, NT dcerpc_request_recv_data(conn, blob, &pkt); break; } - - data_blob_free(blob); } @@ -857,9 +857,12 @@ static void dcerpc_request_recv_data(struct dcerpc_connection *c, if (req == NULL) { DEBUG(2,("dcerpc_request: unmatched call_id %u in response packet\n", pkt->call_id)); + data_blob_free(raw_packet); return; } + talloc_steal(req, raw_packet->data); + if (pkt->ptype == DCERPC_PKT_FAULT) { DEBUG(5,("rpc fault: %s\n", dcerpc_errstr(c, pkt->u.fault.status))); req->fault_code = pkt->u.fault.status; -- cgit