mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
packet: make it possible to free the packet_context from the send_callback
metze
(cherry picked from commit 20795c4a0d5f75561561470231de1a2fad2906ff)
(This used to be commit 5d5b4e4ab2
)
This commit is contained in:
parent
8bf2127313
commit
8350a23093
@ -469,7 +469,13 @@ _PUBLIC_ void packet_queue_run(struct packet_context *pc)
|
|||||||
if (el->nsent == el->blob.length) {
|
if (el->nsent == el->blob.length) {
|
||||||
DLIST_REMOVE(pc->send_queue, el);
|
DLIST_REMOVE(pc->send_queue, el);
|
||||||
if (el->send_callback) {
|
if (el->send_callback) {
|
||||||
|
pc->busy = true;
|
||||||
el->send_callback(el->send_callback_private);
|
el->send_callback(el->send_callback_private);
|
||||||
|
pc->busy = false;
|
||||||
|
if (pc->destructor_called) {
|
||||||
|
talloc_free(pc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
talloc_free(el);
|
talloc_free(el);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user