aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2012-12-09 19:35:23 +0100
committerAndreas Steffen <andreas.steffen@strongswan.org>2012-12-09 19:35:23 +0100
commit92e75e4535ef98b9dd42e322e8126a7bc5a9945e (patch)
tree4b8af1bf0aa3616dbaa9d3c589dcae73eaeab6e5 /src
parent7d17eeb7ef79f47db2e1dfe7f5ae9d484b17f7b6 (diff)
downloadstrongswan-92e75e4535ef98b9dd42e322e8126a7bc5a9945e.tar.bz2
strongswan-92e75e4535ef98b9dd42e322e8126a7bc5a9945e.tar.xz
optionally skip dlclose() of IMCs/IMVs in order to track memory leaks
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/plugins/tnc_imc/tnc_imc.c4
-rw-r--r--src/libcharon/plugins/tnc_imv/tnc_imv.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/libcharon/plugins/tnc_imc/tnc_imc.c b/src/libcharon/plugins/tnc_imc/tnc_imc.c
index d49f3dd08..9ac578401 100644
--- a/src/libcharon/plugins/tnc_imc/tnc_imc.c
+++ b/src/libcharon/plugins/tnc_imc/tnc_imc.c
@@ -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);
}
diff --git a/src/libcharon/plugins/tnc_imv/tnc_imv.c b/src/libcharon/plugins/tnc_imv/tnc_imv.c
index f7b1276ee..ef0387d70 100644
--- a/src/libcharon/plugins/tnc_imv/tnc_imv.c
+++ b/src/libcharon/plugins/tnc_imv/tnc_imv.c
@@ -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);
}