From: Alan T. DeKok Date: Fri, 21 Sep 2018 14:43:08 +0000 (-0400) Subject: move "free clients" to mod_close(), instead of mod_detach() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a505ccc195fc49847166ad2bf3839e099282944b;p=thirdparty%2Ffreeradius-server.git move "free clients" to mod_close(), instead of mod_detach() since the dl framework calls mod_detach, we don't have to do that for child listeners. --- diff --git a/src/lib/io/master.c b/src/lib/io/master.c index 94452955623..65037569921 100644 --- a/src/lib/io/master.c +++ b/src/lib/io/master.c @@ -2297,6 +2297,7 @@ static int mod_close(fr_listen_t *li) fr_io_instance_t *inst; fr_io_connection_t *connection; fr_listen_t *child; + fr_io_client_t *client; get_inst(li->app_io_instance, &inst, &connection, &child); @@ -2322,23 +2323,6 @@ static int mod_close(fr_listen_t *li) talloc_free(connection->dl_inst); } - return 0; -} - - -static int mod_detach(void *instance) -{ - fr_io_instance_t *inst; - fr_io_connection_t *connection; - fr_listen_t *child; - int rcode; - fr_io_client_t *client; - - get_inst(instance, &inst, &connection, &child); - - rcode = inst->app_io->detach(child->app_io_instance); - if (rcode < 0) return rcode; - /* * Each client is it's own talloc context, so we have to * clean them up individually. @@ -2676,7 +2660,6 @@ fr_app_io_t fr_master_app_io = { .magic = RLM_MODULE_INIT, .name = "radius_master_io", - .detach = mod_detach, .bootstrap = mod_bootstrap, .instantiate = mod_instantiate,