From 1c3147f5e7b398fc514d2cef8c9a40c036edf8fd Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 10 Apr 2013 18:03:16 -0400 Subject: [PATCH] Add a test with an active_later event at event_base_free time. --- test/regress.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/regress.c b/test/regress.c index 86b3d197..bfd2e78b 100644 --- a/test/regress.c +++ b/test/regress.c @@ -1406,6 +1406,13 @@ test_active_later(void *ptr) tt_int_op(n_write_a_byte_cb, >, 100); tt_int_op(n_read_and_drain_cb, >, 100); tt_int_op(n_activate_other_event_cb, >, 100); + + /* Now leave this one around, so that event_free sees it and removes + * it. */ + event_active_later_(&ev3, EV_READ); + event_base_assert_ok_(data->base); + event_base_free(data->base); + data->base = NULL; end: ; }