From: Alan T. DeKok Date: Sun, 6 Nov 2011 09:53:11 +0000 (+0100) Subject: We're freeing the connection, so don't use this->next X-Git-Tag: release_3_0_0_beta0~525 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b3c7b13e3221a5e906209d1c354bb7844f70aff;p=thirdparty%2Ffreeradius-server.git We're freeing the connection, so don't use this->next use this = next instead --- diff --git a/src/main/connection.c b/src/main/connection.c index 61fd63267e4..2438d32eab9 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -388,7 +388,7 @@ static int fr_connection_pool_check(fr_connection_pool_t *fc) { int spare, spawn; time_t now = time(NULL); - fr_connection_t *this; + fr_connection_t *this, *next; if (fc->last_checked == now) return 1; @@ -440,7 +440,8 @@ static int fr_connection_pool_check(fr_connection_pool_t *fc) * Pass over all of the connections in the pool, limiting * lifetime, idle time, max requests, etc. */ - for (this = fc->head; this != NULL; this = this->next) { + for (this = fc->head; this != NULL; this = next) { + next = this->next; fr_connection_manage(fc, this, now); }