summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2008-08-27 21:05:35 +0000
committerRich Megginson <rmeggins@redhat.com>2008-08-27 21:05:35 +0000
commitd9d13811cfe7fbb71f54dbc7eada95a027001db1 (patch)
tree932ac5d4afa8ce77f933744346e53c9ca0949acd
parentb6b7f5e4bc4701a9a50f43578dfbc7e1cb300a02 (diff)
downloadds-d9d13811cfe7fbb71f54dbc7eada95a027001db1.tar.gz
ds-d9d13811cfe7fbb71f54dbc7eada95a027001db1.tar.xz
ds-d9d13811cfe7fbb71f54dbc7eada95a027001db1.zip
Resolves: bug 458668
Bug Description: Memory leaks in ids_sasl_user_search Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: This leak occurs when we use the new regex based identity mapping to lookup the user bind dn based on the given user and user realm. There is a pblock allocated but not freed. Platforms tested: RHEL5, Fedora 8 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
-rw-r--r--ldap/servers/slapd/saslbind.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c
index cd0ef62e..a5a0692d 100644
--- a/ldap/servers/slapd/saslbind.c
+++ b/ldap/servers/slapd/saslbind.c
@@ -275,7 +275,11 @@ static void ids_sasl_user_search(
out:
- if (pb) slapi_free_search_results_internal(pb);
+ if (pb) {
+ slapi_free_search_results_internal(pb);
+ slapi_pblock_destroy(pb);
+ pb = NULL;
+ }
return;
}