]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
We're freeing the connection, so don't use this->next
authorAlan T. DeKok <aland@freeradius.org>
Sun, 6 Nov 2011 09:53:11 +0000 (10:53 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 6 Nov 2011 09:53:11 +0000 (10:53 +0100)
use this = next instead

src/main/connection.c

index 61fd63267e480d8236f0abe6aad55938b1e00ea8..2438d32eab996cea9951bfb1be8037f5423e3e7b 100644 (file)
@@ -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);
        }