From: Daniel Kahn Gillmor Date: Sat, 16 Feb 2013 05:03:38 +0000 (-0500) Subject: fix two minor memory leaks when PKCS#11 is in use X-Git-Tag: gnutls_3_1_9~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df416e1bbb0fd5955cdb53a782f1c657b0abd15c;p=thirdparty%2Fgnutls.git fix two minor memory leaks when PKCS#11 is in use --- diff --git a/lib/pkcs11.c b/lib/pkcs11.c index ecddf99304..68f8bd9641 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -625,6 +625,7 @@ gnutls_pkcs11_deinit (void) { if (providers[i].initialized) p11_kit_finalize_module (providers[i].module); + gnutls_free (providers[i].slots); } active_providers = 0; @@ -634,6 +635,8 @@ gnutls_pkcs11_deinit (void) gnutls_pkcs11_set_pin_function (NULL, NULL); gnutls_pkcs11_set_token_function (NULL, NULL); + p11_kit_pin_unregister_callback (P11_KIT_PIN_FALLBACK, p11_kit_pin_file_callback, + NULL); } /**