Skip to content

Commit

Permalink
change check to assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Oct 1, 2019
1 parent 5708c29 commit d1ebb20
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib/server/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ static int _request_free(REQUEST *request)
* which talloc frees the children. And the parents
* state_ctx pointer needs to stick around so that all of
* the children can check it.
*
* If this assertion hits, it means that someone didn't
* call fr_state_store_in_parent()
*/
if (request->state_ctx &&
(!request->parent || (request->parent->state_ctx != request->state_ctx))) {
if (request->state_ctx) {
if (request->parent) rad_assert(request->state_ctx != request->parent->state_ctx);
talloc_free(request->state_ctx);
}

Expand Down

0 comments on commit d1ebb20

Please sign in to comment.