1
0
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:
Andrew Tridgell 2004-10-21 01:44:46 +00:00 committed by Gerald (Jerry) Carter
parent 3bbda7475a
commit 33176e9751

View File

@ -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;
}