From 4fe49af8401b956249d924b89b3e69bce5fb6744 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 13 Mar 2011 22:59:50 -0400 Subject: [PATCH] Fixed a crash in m_ldap is unloaded --- modules/extra/m_ldap.cpp | 2 ++ modules/extra/ns_identify_ldap.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index 47c0c4067..aeb0500e3 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -221,6 +221,8 @@ class ModuleLDAP : public Module, public Pipe { it->second->SetExitState(); it->second->Wakeup(); + it->second->Join(); + delete it->second; } LDAPServices.clear(); } diff --git a/modules/extra/ns_identify_ldap.cpp b/modules/extra/ns_identify_ldap.cpp index 08b06a18a..bf98cbeac 100644 --- a/modules/extra/ns_identify_ldap.cpp +++ b/modules/extra/ns_identify_ldap.cpp @@ -217,7 +217,7 @@ class NSIdentifyLDAP : public Module void OnNickIdentify(User *u) { - if (email_attribute.empty()) + if (email_attribute.empty() || !this->ldap) return; try