diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-01 16:09:59 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-24 22:19:20 +0200 |
commit | 325dace7e2a0ae1f4d477416e9e8f05f7c843fdf (patch) | |
tree | d27716efa83aba2e94b47a1e8ab20201a069293f | |
parent | c5ae83788cb6b8681e52c4d940a3fd88e87bd4d6 (diff) | |
download | sssd-325dace7e2a0ae1f4d477416e9e8f05f7c843fdf.tar.gz sssd-325dace7e2a0ae1f4d477416e9e8f05f7c843fdf.tar.bz2 sssd-325dace7e2a0ae1f4d477416e9e8f05f7c843fdf.zip |
Do not keep growing event context
-rw-r--r-- | src/util/child_common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/child_common.c b/src/util/child_common.c index 5f0b2659..a42d3a42 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, @@ -211,7 +213,7 @@ void sss_child_handler(struct tevent_context *ev, if (error == HASH_SUCCESS) { child_ctx = talloc_get_type(value.ptr, struct sss_child_ctx); - imm = tevent_create_immediate(sigchld_ctx->ev); + imm = tevent_create_immediate(child_ctx); if (imm == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory invoking SIGCHLD callback\n")); @@ -555,13 +557,13 @@ void child_sig_handler(struct tevent_context *ev, /* Invoke the callback in a tevent_immediate handler * so that it is safe to free the tevent_signal * */ - imm = tevent_create_immediate(ev); + imm = tevent_create_immediate(child_ctx); if (imm == NULL) { DEBUG(0, ("Out of memory invoking sig handler callback\n")); return; } - tevent_schedule_immediate(imm, ev,child_invoke_callback, + tevent_schedule_immediate(imm, ev, child_invoke_callback, child_ctx); } |