diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-04-10 18:03:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-04-10 18:03:16 -0400 |
commit | 1c3147f5e7b398fc514d2cef8c9a40c036edf8fd (patch) | |
tree | 5352eba8c9133b821592835068d64905d2cf064c /test/regress.c | |
parent | 95acdaa353419fc53e4324f34fa7e591f5bb5b38 (diff) | |
download | libevent-1c3147f5e7b398fc514d2cef8c9a40c036edf8fd.tar.gz |
Add a test with an active_later event at event_base_free time.
Diffstat (limited to 'test/regress.c')
-rw-r--r-- | test/regress.c | 7 |
1 files changed, 7 insertions, 0 deletions
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: ; } |