corrected deinitialisation of public key factory
authorTobias Brunner <tobias@strongswan.org>
Thu, 15 May 2008 12:39:35 +0000 (12:39 -0000)
committerTobias Brunner <tobias@strongswan.org>
Thu, 15 May 2008 12:39:35 +0000 (12:39 -0000)
src/libstrongswan/plugins/gmp/gmp_plugin.c
src/libstrongswan/plugins/pubkey/pubkey_plugin.c

index 9f637e6..ffae669 100644 (file)
@@ -46,8 +46,6 @@ static void destroy(private_gmp_plugin_t *this)
                                                (builder_constructor_t)gmp_rsa_private_key_builder);
        lib->creds->remove_builder(lib->creds,
                                                (builder_constructor_t)gmp_rsa_public_key_builder);
-       lib->creds->remove_builder(lib->creds,
-                                               (builder_constructor_t)gmp_public_key_builder);
        free(this);
 }
 
index 37d0dcd..dd7ac6f 100644 (file)
@@ -40,7 +40,9 @@ struct private_pubkey_plugin_t {
 static void destroy(private_pubkey_plugin_t *this)
 {
        lib->creds->remove_builder(lib->creds,
-                                                          (builder_constructor_t)pubkey_cert_builder);
+                                                       (builder_constructor_t)pubkey_cert_builder);
+       lib->creds->remove_builder(lib->creds,
+                                                       (builder_constructor_t)pubkey_public_key_builder);
        free(this);
 }