]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
update comments as per latest code changes
authorAlan T. DeKok <aland@freeradius.org>
Tue, 3 Apr 2018 15:40:35 +0000 (11:40 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 3 Apr 2018 15:40:35 +0000 (11:40 -0400)
src/lib/io/schedule.c

index a75f6bb290fa5232f893088c0de9697d078cabd2..5fb85714f9cb72837e78f0c258e427ea3902321f 100644 (file)
@@ -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) {