Skip to content

Commit

Permalink
Merge pull request libevent#57 from rosslagerwall/memleak
Browse files Browse the repository at this point in the history
Fix a couple of memory leaks (found with Valgrind).
  • Loading branch information
nmathewson committed Jun 6, 2012
2 parents fcec3e8 + 3b2529a commit 60f6540
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test-changelist.c
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/test-ratelim.c
Expand Up @@ -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,
Expand Down

0 comments on commit 60f6540

Please sign in to comment.