mirror of
https://github.com/samba-team/samba.git
synced 2025-01-20 14:03:59 +03:00
packet: make it possible to free the packet_context from the send_callback
metze (cherry picked from commit 20795c4a0d5f75561561470231de1a2fad2906ff)
This commit is contained in:
parent
9a5f7bf68b
commit
5d5b4e4ab2
@ -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…
x
Reference in New Issue
Block a user