[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapd memory leaks (ITS#379)

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