From: Arran Cudbard-Bell Date: Tue, 7 Feb 2023 23:33:49 +0000 (-0600) Subject: Use the new state replace function for restoring state for children X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d92deae45fe6fcbbca15c14dac23340f1e8d6b4;p=thirdparty%2Ffreeradius-server.git Use the new state replace function for restoring state for children --- diff --git a/src/lib/server/state.c b/src/lib/server/state.c index 76159448f84..83cc20ccc9d 100644 --- a/src/lib/server/state.c +++ b/src/lib/server/state.c @@ -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;