]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set state_ctx so we don't leak
authorAlan T. DeKok <aland@freeradius.org>
Tue, 29 Aug 2017 12:46:21 +0000 (08:46 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 29 Aug 2017 12:46:21 +0000 (08:46 -0400)
src/main/unlang_interpret.c

index 6cb7d72ac1ac884019fbb698c17a0302f8a1526a..53eca2630d36c0f868ad7ff2236e1fe90f7d10fa 100644 (file)
@@ -559,6 +559,12 @@ static REQUEST *unlang_child_alloc(REQUEST *request, unlang_t *instruction, rlm_
        child->el = request->el;
        child->server_cs = request->server_cs;
 
+       /*
+        *      If this is used, it needs to be freed when the child
+        *      is freed.
+        */
+       child->state_ctx = child;
+
        /*
         *      Initialize all of the async fields.
         */