summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/extra/m_ldap.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp
index 01e927633..1fc8460f7 100644
--- a/modules/extra/m_ldap.cpp
+++ b/modules/extra/m_ldap.cpp
@@ -497,8 +497,13 @@ class ModuleLDAP : public Module, public Pipe
for (unsigned i = s->results.size(); i > 0; --i)
{
LDAPInterface *li = s->results[i - 1].first;
+ LDAPResult *r = s->results[i - 1].second;
+
if (li->owner == m)
+ {
s->results.erase(s->results.begin() + i - 1);
+ delete r;
+ }
}
s->Unlock();
}
@@ -524,6 +529,8 @@ class ModuleLDAP : public Module, public Pipe
li->OnError(*r);
else
li->OnResult(*r);
+
+ delete r;
}
}
}