]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
optionally skip dlclose() of IMCs/IMVs in order to track memory leaks
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 9 Dec 2012 18:35:23 +0000 (19:35 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 9 Dec 2012 18:35:23 +0000 (19:35 +0100)
src/libcharon/plugins/tnc_imc/tnc_imc.c
src/libcharon/plugins/tnc_imv/tnc_imv.c

index d49f3dd0886317c81750c66311460c0eed3f2b2f..9ac578401a10099c15a9b8a6126cb4d7ea9d62d6 100644 (file)
@@ -21,6 +21,7 @@
 #include <tncif_pa_subtypes.h>
 
 #include <utils/debug.h>
+#include <daemon.h>
 #include <library.h>
 #include <collections/linked_list.h>
 #include <threading/mutex.h>
@@ -302,7 +303,8 @@ METHOD(imc_t, type_supported, bool,
 METHOD(imc_t, destroy, void,
        private_tnc_imc_t *this)
 {
-       if (this->handle)
+       if (this->handle && lib->settings->get_bool(lib->settings,
+               "%s.plugins.tnc-imc.dlclose", TRUE, charon->name))
        {
                dlclose(this->handle);
        }
index f7b1276eec4568070868019d7e9782cf1149c0c7..ef0387d70147860b3c02196a85b31af79b737416 100644 (file)
@@ -21,6 +21,7 @@
 #include <tncif_pa_subtypes.h>
 
 #include <utils/debug.h>
+#include <daemon.h>
 #include <library.h>
 #include <collections/linked_list.h>
 #include <threading/mutex.h>
@@ -298,7 +299,8 @@ METHOD(imv_t, type_supported, bool,
 METHOD(imv_t, destroy, void,
        private_tnc_imv_t *this)
 {
-       if (this->handle)
+       if (this->handle && lib->settings->get_bool(lib->settings,
+               "%s.plugins.tnc-imv.dlclose", TRUE, charon->name))
        {
                dlclose(this->handle);
        }