mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix potential Null pointer dereference in regress_finalize.c
This commit is contained in:
parent
17796a2d8a
commit
2bdf17370c
@ -130,6 +130,7 @@ test_fin_cb_invoked(void *arg)
|
||||
/* Okay, now add but don't have it become active, and make sure *that*
|
||||
* works. */
|
||||
ev = evtimer_new(base, timer_callback, &ev_called);
|
||||
tt_assert(ev);
|
||||
event_add(ev, &ten_sec);
|
||||
event_free_finalize(0, ev, event_finalize_callback_1);
|
||||
|
||||
@ -141,6 +142,7 @@ test_fin_cb_invoked(void *arg)
|
||||
|
||||
/* Now try adding and deleting after finalizing. */
|
||||
ev = evtimer_new(base, timer_callback, &ev_called);
|
||||
tt_assert(ev);
|
||||
evtimer_assign(&ev2, base, timer_callback, &ev_called);
|
||||
event_add(ev, &ten_sec);
|
||||
event_free_finalize(0, ev, event_finalize_callback_1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user