diff options
author | Tobias Brunner <tobias@strongswan.org> | 2011-12-15 12:20:09 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2011-12-15 12:20:09 +0100 |
commit | a5951a2861970411b0e29ea1be0483e94019aa4f (patch) | |
tree | eae3281d5c0bb4f7d06abe4d21faf920b073bae7 /src/libstrongswan/library.c | |
parent | 49b44c98c129633f596629c0d8a940dada0d4c4d (diff) | |
download | strongswan-a5951a2861970411b0e29ea1be0483e94019aa4f.tar.bz2 strongswan-a5951a2861970411b0e29ea1be0483e94019aa4f.tar.xz |
Make sure the certificate cache is flushed when plugins are unloaded.
This avoids segmentation faults when plugins implementing cert_t are
already unloaded when the cache is flushed during destruction.
Diffstat (limited to 'src/libstrongswan/library.c')
-rw-r--r-- | src/libstrongswan/library.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c index 6ed4d1285..cd6a41f44 100644 --- a/src/libstrongswan/library.c +++ b/src/libstrongswan/library.c @@ -61,6 +61,9 @@ void library_deinit() detailed = lib->settings->get_bool(lib->settings, "libstrongswan.leak_detective.detailed", TRUE); + /* make sure the cache is clear before unloading plugins */ + lib->credmgr->flush_cache(lib->credmgr, CERT_ANY); + this->public.scheduler->destroy(this->public.scheduler); this->public.processor->destroy(this->public.processor); this->public.plugins->destroy(this->public.plugins); |