mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
r3103: use a destructor to ensure that on abnormnal rpc request termination
it is removed from the pending list. (This used to be commit 33176e9751374de3b5dc3f5f9b19c6824140d90a)
This commit is contained in:
parent
5b09d503ff
commit
34f84aae55
@ -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…
x
Reference in New Issue
Block a user