mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
r3103: use a destructor to ensure that on abnormnal rpc request termination
it is removed from the pending list.
This commit is contained in:
parent
3bbda7475a
commit
33176e9751
@ -819,6 +819,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
|
||||
*/
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user