>From 2bf384857360b18c84863f20cebfa82facc1c010 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 1 Apr 2013 16:09:59 +0200 Subject: [PATCH] Do not keep growing event context --- src/util/child_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/child_common.c b/src/util/child_common.c index 5f0b2659571731a70211df310648a5cc8aee241c..fb001f2c4dfac979cb3e2412b983d8487373e88b 100644 --- a/src/util/child_common.c +++ b/src/util/child_common.c @@ -172,6 +172,8 @@ static void sss_child_invoke_cb(struct tevent_context *ev, if (child_ctx->cb) { child_ctx->cb(child_ctx->pid, cb_pvt->wait_status, child_ctx->pvt); } + + talloc_free(imm); } void sss_child_handler(struct tevent_context *ev, @@ -561,7 +563,7 @@ void child_sig_handler(struct tevent_context *ev, return; } - tevent_schedule_immediate(imm, ev,child_invoke_callback, + tevent_schedule_immediate(imm, ev, child_invoke_callback, child_ctx); } @@ -580,6 +582,7 @@ static void child_invoke_callback(struct tevent_context *ev, /* Stop monitoring for this child */ talloc_free(child_ctx); + talloc_free(imm); } static errno_t prepare_child_argv(TALLOC_CTX *mem_ctx, -- 1.8.1.4