Full_Name: Jeff Romine Version: OPENLDAP_REL_ENG_2_0_ALPHA3 OS: Solaris 2.7 URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (206.81.132.94) Found a couple of memory leaks in slapd using Purify. cvs diffs of my fixes: Index: controls.c =================================================================== RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/controls.c,v retrieving revision 1.6.2.2 diff -r1.6.2.2 controls.c 65a66 > #if 0 68c69,70 < --- > #endif > 76d77 < Index: back-ldbm/alias.c =================================================================== RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-ldbm/alias.c,v retrieving revision 1.23.2.1 diff -r1.23.2.1 alias.c 207a208 > charray_free(dnlist);
Just for the record... The fix for alias.c is applied in rev 1.25. It doesn't look like controls.c has a bug.
changed state Open to Feedback
Howard Chu wrote: > Just for the record... The fix for alias.c is applied in rev 1.25. It doesn't > look like controls.c has a bug. Yes, I saw that the alias.c fix got committed. Thank you. controls.c definitely has a small memory leak. A pointer size piece of memory gets allocated on line 68: 68: *ctrls = ch_malloc( 1 * sizeof(LDAPControl *) ); This pointer is then set to NULL on the next active line, line 78: 78: ctrls[nctrls] = NULL; since nctrls is initialized to 0 and this is the first use of it in the function. -Jeff
OK. The bug in slapd/controls.c is fixed in rev 1.10. The same bug in libldap/controls.c is fixed in rev 1.21
changed state Feedback to Closed moved from Incoming to Software Bugs