From 8c594168785feb1b899350b03538ed24756d3be6 Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Fri, 19 Dec 2008 21:03:42 +0000 Subject: [PATCH] memory leak: forgot to free paused rpcs in server svn:r962 --- evrpc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/evrpc.c b/evrpc.c index fd3b93f0..5fd0df21 100644 --- a/evrpc.c +++ b/evrpc.c @@ -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)); } -- 2.40.0