Fix abort on exit on Solaris; properly deregister events in evports.

This commit is contained in:
W.C.A. Wijngaards 2014-02-04 14:16:04 +01:00
parent 91d9bcf074
commit e0f9ab9688
1 changed files with 3 additions and 1 deletions

View File

@ -130,8 +130,10 @@ main(int argc, char** argv)
// TODO: check the return value above // TODO: check the return value above
} }
/* Clean up */ /* Clean up */
event_base_free(this_event_base);
getdns_context_destroy(this_context); getdns_context_destroy(this_context);
/* the event base can only be free'd after the context has removed
* all of its events from it */
event_base_free(this_event_base);
/* Assuming we get here, leave gracefully */ /* Assuming we get here, leave gracefully */
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} /* main */ } /* main */