]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add missing get_type_abort in conn_free
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 1 Oct 2017 12:09:04 +0000 (20:09 +0800)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 1 Oct 2017 13:28:25 +0000 (21:28 +0800)
src/modules/rlm_radius/rlm_radius_udp.c

index fde694959891250a234d55410a530fae0fc247fc..34470636ca04c8aff80a5d313ee493f999093d40 100644 (file)
@@ -1764,7 +1764,7 @@ static int _conn_free(rlm_radius_udp_connection_t *c)
 {
        fr_dlist_t                      *entry;
        rlm_radius_udp_request_t        *u;
-       rlm_radius_udp_thread_t         *t = c->thread;
+       rlm_radius_udp_thread_t         *t = talloc_get_type_abort(c->thread, rlm_radius_udp_thread_t);
 
        /*
         *      We're no longer using this connection.
@@ -1778,6 +1778,10 @@ static int _conn_free(rlm_radius_udp_connection_t *c)
                if (cas_decr(c->inst->parent->num_connections, num_connections)) break;
        }
 
+       /*
+        *      Explicit free not technically required,
+        *      but may prevent future ordering issues.
+        */
        talloc_free(c->conn);
        c->conn = NULL;