From: Alan T. DeKok Date: Tue, 3 Oct 2017 18:19:32 +0000 (-0400) Subject: assert that the parent is pointing to us X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36d38ecfea58f53ec1c4052ac4cb49fe39e93a76;p=thirdparty%2Ffreeradius-server.git assert that the parent is pointing to us --- diff --git a/src/lib/util/event.c b/src/lib/util/event.c index 785c7ed2c7d..65716727941 100644 --- a/src/lib/util/event.c +++ b/src/lib/util/event.c @@ -988,6 +988,8 @@ int fr_event_timer_insert(TALLOC_CTX *ctx, fr_event_list_t *el, fr_event_timer_t } else { memcpy(&ev, ev_p, sizeof(ev)); /* Not const to us */ + rad_assert(*ev_p == ev); + /* * We can't disarm the linking context due to * limitations in talloc, so if the linking @@ -1293,6 +1295,8 @@ int fr_event_timer_run(fr_event_list_t *el, struct timeval *when) callback = ev->callback; memcpy(&uctx, &ev->uctx, sizeof(uctx)); + rad_assert(*ev->parent == ev); + /* * Delete the event before calling it. */