summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
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 4a5247c9ea9..f6fc61d764c 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);
}
}