tevent: fix crash bug in tevent_queue_immediate_trigger()
commitc77fbd2cf9a555e12597d5a671a534fa7140e523
authorStefan Metzmacher <metze@samba.org>
Sat, 11 Jan 2014 07:58:05 +0000 (11 08:58 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 1 Apr 2014 07:11:19 +0000 (1 09:11 +0200)
tree160380bccf23d011fcc2cf8aee33af9f1951a07e
parent71eade3f8f2e6196fb839259e1467c9223086489
tevent: fix crash bug in tevent_queue_immediate_trigger()

Assume we we have a queue with 2 entries (A and B with triggerA() and triggerB()).
If triggerA() removes itself tevent_queue_entry_destructor() will be called
for A, this schedules the immediate event to call triggerB().
If triggerA() then also removes B by an explicit of implizit talloc_free(),
q->list is NULL, but the immediate event is still scheduled and can't be unscheduled.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 7fe5584e2a59584431cb2ddf8a4da22bfb924454)
lib/tevent/tevent_queue.c