ares_init_options() fix crash on misuse of event thread options

If an invalid event thread system was provided, it would crash during cleanup due to a NULL pointer dereference.

Fixes Issue: #749
Fix By: Brad House (@bradh352)
pull/754/head
Brad House 9 months ago
parent 09e82e05a3
commit 751201a047
  1. 2
      src/lib/ares_event_thread.c

@ -309,7 +309,7 @@ static void ares_event_thread_destroy_int(ares_event_thread_t *e)
ares__htable_asvp_destroy(e->ev_handles);
e->ev_handles = NULL;
if (e->ev_sys->destroy) {
if (e->ev_sys && e->ev_sys->destroy) {
e->ev_sys->destroy(e);
}

Loading…
Cancel
Save