]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
assert that the parent is pointing to us
authorAlan T. DeKok <aland@freeradius.org>
Tue, 3 Oct 2017 18:19:32 +0000 (14:19 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 3 Oct 2017 18:19:32 +0000 (14:19 -0400)
src/lib/util/event.c

index 785c7ed2c7dd4f13a71eb52353a4ad34d9a0c567..657167279414928eeeeacb869e559914f08b7ac0 100644 (file)
@@ -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.
         */