From: Andrew Tridgell Date: Wed, 1 Jul 2009 04:08:13 +0000 (+1000) Subject: A rather strange varient of talloc_unlink X-Git-Tag: talloc-2.0.0~841 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=386211a81ce9091db0d6dbb711dc656af412c649;p=thirdparty%2Fsamba.git A rather strange varient of talloc_unlink A dcerpc request may have a reference from a still completing async callback, but we now consider the request to be complete. We want to lose the main parent, leaving just the reference, if any. --- diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 13f649cdd9c..0ae56a470e5 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -1144,7 +1144,7 @@ NTSTATUS dcerpc_request_recv(struct rpc_request *req, if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) { req->p->last_fault_code = req->fault_code; } - talloc_free(req); + talloc_unlink(talloc_parent(req), req); return status; }