1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 15:03:14 +02:00

Don't leak ldap results

This commit is contained in:
Adam
2013-12-26 21:06:07 -05:00
parent b28db7bc55
commit 16f3f0cbc0
+7
View File
@@ -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;
}
}
}