From ed9fc3a4a4c46772ffeb6616c260624618a42c81 Mon Sep 17 00:00:00 2001 From: Fabian Mauchle Date: Sun, 16 Oct 2016 18:17:21 +0200 Subject: fix hasdynamicserver --- radsecproxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radsecproxy.c b/radsecproxy.c index f428e6c..6d8ebe5 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -783,7 +783,7 @@ int hasdynamicserver(struct list *srvconfs) { if (((struct clsrvconf *)entry->data)->dynamiclookupcommand || ((struct clsrvconf *)entry->data)->servers->in_use) #else - if (((struct clsrvconf *)entry->data)->dynamiclookupcommand) + if (((struct clsrvconf *)entry->data)->servers->dynamiclookuparg) #endif return 1; return 0; @@ -1988,7 +1988,6 @@ errexit: #if defined ENABLE_EXPERIMENTAL_DYNDISC server->in_use = 0; #endif - conf->servers = NULL; if (server->dynamiclookuparg) { removeserversubrealms(realms, conf); if (dynconffail) @@ -1996,6 +1995,7 @@ errexit: else freeclsrvconf(conf); } + conf->servers = NULL; freeserver(server, 1); ERR_remove_state(0); return NULL; -- cgit v1.1