]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Parent thread instance tree from worker so it gets cleaned up at the right point
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 4 Apr 2018 14:32:46 +0000 (15:32 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 4 Apr 2018 14:32:46 +0000 (15:32 +0100)
src/lib/io/schedule.c

index 038056c93daacc457628976972e83f4ea265112c..0b356a8b85bdfc7b30270c8598280d965688fada 100644 (file)
@@ -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;
                }