mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
Fix a couple of memory leaks (found with Valgrind).
This commit is contained in:
parent
fcec3e80c4
commit
3b2529acf2
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user