Avoid a segfault when all methods are disabled or broken

This commit is contained in:
Nick Mathewson 2011-06-01 17:27:28 -04:00
parent d54d3fc40d
commit 27ce38b618

View File

@ -603,6 +603,7 @@ event_base_new_with_config(const struct event_config *cfg)
if (base->evbase == NULL) {
event_warnx("%s: no event mechanism available",
__func__);
base->evsel = NULL;
event_base_free(base);
return NULL;
}