Browse Source

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

Rich Megginson 17 years ago
parent
commit
d9d13811cf
1 changed files with 5 additions and 1 deletions
  1. 5 1
      ldap/servers/slapd/saslbind.c

+ 5 - 1
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;
 }