diff options
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index d41eebbf2f..e522f91423 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -820,6 +820,16 @@ static void dcerpc_request_recv_data(struct dcerpc_pipe *p, /* + make sure requests are cleaned up + */ +static int dcerpc_req_destructor(void *ptr) +{ + struct rpc_request *req = ptr; + DLIST_REMOVE(req->p->pending, req); + return 0; +} + +/* perform the send size of a async dcerpc request */ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, @@ -903,6 +913,8 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, remaining -= chunk; } + talloc_set_destructor(req, dcerpc_req_destructor); + return req; } |