tevent: fix crash bug in tevent_queue_immediate_trigger()
authorStefan Metzmacher <metze@samba.org>
Sat, 11 Jan 2014 07:58:05 +0000 (08:58 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 17 Jan 2014 11:38:08 +0000 (12:38 +0100)
commitaf21c56bd37474a1981f854497dbd5d1e5cc24cd
tree61368328d60cbb1882dacc885a0aa47dec36bc6d
parent7fc026b27281d41ecbcddc630722afc61e7d42ff
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>