]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use the new state replace function for restoring state for children
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 7 Feb 2023 23:33:49 +0000 (17:33 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 7 Feb 2023 23:34:20 +0000 (17:34 -0600)
src/lib/server/state.c

index 76159448f84b4e87b7be6ed0165f4293be28934c..83cc20ccc9dd7f0aea2f45b02b3413f5adb4a9f2 100644 (file)
@@ -875,9 +875,8 @@ void fr_state_restore_to_child(request_t *child, void const *unique_ptr, int uni
        /*
         *      If we can restore from the parent, do so
         */
-       TALLOC_FREE(child->session_state_ctx);
        fr_assert_msg(child_entry->ctx, "session child entry missing ctx");
-       child->session_state_ctx = child_entry->ctx;
+       talloc_free(request_state_replace(child, child_entry->ctx));
        child_entry->ctx = NULL;                                /* No longer owns the ctx */
        child_entry->thawed = child;