Fix a couple of memory leaks (found with Valgrind).

This commit is contained in:
Ross Lagerwall 2012-06-06 21:57:12 +02:00
parent fcec3e80c4
commit 3b2529acf2
2 changed files with 5 additions and 0 deletions

View File

@ -202,6 +202,10 @@ main(int argc, char **argv)
event_base_dispatch(base);
event_free(ev);
event_free(timeout);
event_base_free(base);
get_cpu_usage(&timer, &secPassed, &secUsed, &usage);
/* attempt to calculate our cpu usage over the test should be

View File

@ -210,6 +210,7 @@ test_ratelimiting(void)
#endif
base = event_base_new_with_config(base_cfg);
event_config_free(base_cfg);
listener = evconnlistener_new_bind(base, echo_listenercb, base,
LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE, -1,