summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-23 00:51:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:39 -0500
commit090898de71ee0bb2d10cb4f227a37b2e4c83f2da (patch)
tree2e494dbe4e8f15dc3a2d179b114b9506020d1aa7 /source4/librpc/rpc
parent69c531b75c2aa969fe3e028b92ea5817be574575 (diff)
downloadsamba-090898de71ee0bb2d10cb4f227a37b2e4c83f2da.tar.gz
samba-090898de71ee0bb2d10cb4f227a37b2e4c83f2da.tar.bz2
samba-090898de71ee0bb2d10cb4f227a37b2e4c83f2da.zip
r11871: fixed a problem volker found with the async bind code, and a callback
destroying the dcerpc pipe (This used to be commit 0b91602fa4b9a8b40331d088bdaac76381eac7ef)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c7
1 files changed, 5 insertions, 2 deletions
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;