Pierangelo Masarati <ando(a)sys-net.it> wrote:
At a quick glance, you're leaking the callback containing the
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.
Here is an update, I hope it addresses the concerns you raised: