From: Daiki Ueno Date: Fri, 11 Aug 2017 13:39:20 +0000 (+0200) Subject: client: Fix order of cleanup X-Git-Tag: 0.23.8~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f0a948ebcf659a1f2c3d5fb30991ebdf73b5976;p=p11-kit client: Fix order of cleanup In C_GetFunctionList, state->virt is wrapped with a destroyer function free(). Thus p11_rpc_transport_free must be called before p11_virtual_unwrap. --- diff --git a/p11-kit/client.c b/p11-kit/client.c index b4eb57f..26b2e74 100644 --- a/p11-kit/client.c +++ b/p11-kit/client.c @@ -220,7 +220,7 @@ p11_client_module_cleanup (void) for (; state != NULL; state = next) { next = state->next; - p11_virtual_unwrap (state->wrapped); p11_rpc_transport_free (state->rpc); + p11_virtual_unwrap (state->wrapped); } }