From: Alan T. DeKok Date: Tue, 3 Apr 2018 15:40:35 +0000 (-0400) Subject: update comments as per latest code changes X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c015bbd25c7cadc0a7d668d7b235e5feb1567b2;p=thirdparty%2Ffreeradius-server.git update comments as per latest code changes --- diff --git a/src/lib/io/schedule.c b/src/lib/io/schedule.c index a75f6bb290f..5fb85714f9c 100644 --- a/src/lib/io/schedule.c +++ b/src/lib/io/schedule.c @@ -564,12 +564,12 @@ int fr_schedule_destroy(fr_schedule_t *sc) fr_dlist_remove(entry); /* - * We can't free the context, because the event - * loop is allocated from it. And the per-module - * thread instance data isn't freed until the - * thread is freed, which happens asynchronously. - * We can't catch that, so the best bet in the - * short term is to just leak this memory on exit. + * Ensure that the thread has exited before + * cleaning up the context. + * + * This also ensures that the child threads have + * exited before the main thread cleans up the + * module instances. */ sw = fr_ptr_to_type(fr_schedule_worker_t, entry, entry); if (pthread_join(sw->pthread_id, NULL) != 0) {