summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-09-27 10:29:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:02 -0500
commitfa70d1d0c28ff8065ca40a3682dc50131b7a6ecf (patch)
tree5cb99ab40838c69b0be0577542d7fd021df83736 /source4
parent42b81d7c3e8ac9ad4c35d5377decbdd5ab18ffbb (diff)
downloadsamba-fa70d1d0c28ff8065ca40a3682dc50131b7a6ecf.tar.gz
samba-fa70d1d0c28ff8065ca40a3682dc50131b7a6ecf.tar.bz2
samba-fa70d1d0c28ff8065ca40a3682dc50131b7a6ecf.zip
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)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/composite/composite.c6
1 files changed, 6 insertions, 0 deletions
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);
}
}