diff options
author | Niels Provos <provos@gmail.com> | 2008-12-19 21:03:42 +0000 |
---|---|---|
committer | Niels Provos <provos@gmail.com> | 2008-12-19 21:03:42 +0000 |
commit | 8c594168785feb1b899350b03538ed24756d3be6 (patch) | |
tree | b76db9a6810ea98f3d0a4ffdb3876be8022b9997 /evrpc.c | |
parent | 77867244a9bb7af857a198cfc2ed08227895e88f (diff) | |
download | libevent-8c594168785feb1b899350b03538ed24756d3be6.tar.gz |
memory leak: forgot to free paused rpcs in server
svn:r962
Diffstat (limited to 'evrpc.c')
-rw-r--r-- | evrpc.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -92,10 +92,15 @@ evrpc_free(struct evrpc_base *base) { struct evrpc *rpc; struct evrpc_hook *hook; + struct evrpc_hook_ctx *pause; while ((rpc = TAILQ_FIRST(&base->registered_rpcs)) != NULL) { assert(evrpc_unregister_rpc(base, rpc->uri)); } + while ((pause = TAILQ_FIRST(&base->paused_requests)) != NULL) { + TAILQ_REMOVE(&base->paused_requests, pause, next); + mm_free(pause); + } while ((hook = TAILQ_FIRST(&base->input_hooks)) != NULL) { assert(evrpc_remove_hook(base, EVRPC_INPUT, hook)); } |