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

Re: (ITS#5872) slapo-cloak

manu@netbsd.org wrote:
> Pierangelo Masarati <ando@sys-net.it> wrote:
>>> How do I book an OID for the config database, for an overlay in contrib?
>>> Is it ok to just keep the comment in servers/slapd/bconfig.c?
>>>  * OLcfgOv{Oc|At}:22                   -> cloak
>> Yes.  Why did you skip :21, BTW?
> Can't remeber why. I'll go back to 21.

At a quick glance, you're leaking the callback containing the cloak 
response.  You should remove (and free it) when called with REP_RESULT 
as sr_type, and add a slap_freeself_cb() cleanup hook.  You won't notice 
the memory leak unless you build slapd with SLAP_NO_SL_MALLOC set, or 
unless your overlay operates within a slab memory intensive context. 
Configuration is leaking as well, I couldn't exactly trace where.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it