From: Andreas Steffen Date: Sun, 9 Dec 2012 18:35:23 +0000 (+0100) Subject: optionally skip dlclose() of IMCs/IMVs in order to track memory leaks X-Git-Tag: 5.0.2dr4~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92e75e4535ef98b9dd42e322e8126a7bc5a9945e;p=thirdparty%2Fstrongswan.git optionally skip dlclose() of IMCs/IMVs in order to track memory leaks --- diff --git a/src/libcharon/plugins/tnc_imc/tnc_imc.c b/src/libcharon/plugins/tnc_imc/tnc_imc.c index d49f3dd088..9ac578401a 100644 --- a/src/libcharon/plugins/tnc_imc/tnc_imc.c +++ b/src/libcharon/plugins/tnc_imc/tnc_imc.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -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 f7b1276eec..ef0387d701 100644 --- a/src/libcharon/plugins/tnc_imv/tnc_imv.c +++ b/src/libcharon/plugins/tnc_imv/tnc_imv.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -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); }