From fa70d1d0c28ff8065ca40a3682dc50131b7a6ecf Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 27 Sep 2005 10:29:13 +0000 Subject: r10529: fix a crash bug in full async code the uses the composite_trigger_done() code the event subsystem wants to free timed_events! metze (This used to be commit dc5d5953b60662b895ad148525e84d82882d62a8) --- source4/libcli/composite/composite.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/libcli/composite/composite.c') diff --git a/source4/libcli/composite/composite.c b/source4/libcli/composite/composite.c index 4a5247c9ea..f6fc61d764 100644 --- a/source4/libcli/composite/composite.c +++ b/source4/libcli/composite/composite.c @@ -52,6 +52,12 @@ static void composite_trigger(struct event_context *ev, struct timed_event *te, { struct composite_context *c = talloc_get_type(ptr, struct composite_context); if (c->async.fn) { + /* + * the event is a child of req, + * and req will be free'ed by the callback fn + * but the events code wants to free the event itself + */ + talloc_steal(ev, te); c->async.fn(c); } } -- cgit