From: Arran Cudbard-Bell Date: Wed, 4 Apr 2018 14:32:46 +0000 (+0100) Subject: Parent thread instance tree from worker so it gets cleaned up at the right point X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29baf387efd415c602f587a4e4dbf97397e80fa0;p=thirdparty%2Ffreeradius-server.git Parent thread instance tree from worker so it gets cleaned up at the right point --- diff --git a/src/lib/io/schedule.c b/src/lib/io/schedule.c index 038056c93da..0b356a8b85b 100644 --- a/src/lib/io/schedule.c +++ b/src/lib/io/schedule.c @@ -385,8 +385,11 @@ fr_schedule_t *fr_schedule_create(TALLOC_CTX *ctx, fr_event_list_t *el, goto st_fail; } + /* + * Parent thread-specific data from the single_worker + */ if (sc->worker_thread_instantiate && - (sc->worker_thread_instantiate(ctx, el, sc->worker_instantiate_ctx) < 0)) { + (sc->worker_thread_instantiate(sc->single_worker, el, sc->worker_instantiate_ctx) < 0)) { fr_log(sc->log, L_ERR, "Failed calling thread instantiate: %s", fr_strerror()); goto st_fail; }