]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
fix two minor memory leaks when PKCS#11 is in use
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 16 Feb 2013 05:03:38 +0000 (00:03 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 16 Feb 2013 05:03:38 +0000 (00:03 -0500)
lib/pkcs11.c

index ecddf99304433bb5802f82ea0330e1eeecb1be78..68f8bd964154acd1fe7c1233e7f6e4da79725281 100644 (file)
@@ -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);
 }
 
 /**