From 0c71452290977332a0e86d9eb0d04b291cce2263 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 19 Sep 2012 07:12:39 +0000 Subject: rpc-layer: Fix memory leak in call state pool https://bugzilla.gnome.org/show_bug.cgi?id=684351 --- diff --git a/pkcs11/rpc-layer/gkm-rpc-module.c b/pkcs11/rpc-layer/gkm-rpc-module.c index b95bee1..240fd83 100644 --- a/pkcs11/rpc-layer/gkm-rpc-module.c +++ b/pkcs11/rpc-layer/gkm-rpc-module.c @@ -1254,6 +1254,13 @@ rpc_C_Finalize (CK_VOID_PTR reserved) warning (("finalizing the daemon returned an error: %d", ret)); } + /* Cleanup the call state pool */ + while (call_state_pool) { + cs = call_state_pool; + call_state_pool = cs->next; + call_destroy (cs); + } + /* This should stop all other calls in */ pkcs11_initialized = 0; pkcs11_initialized_pid = 0; -- cgit v0.9.0.2