I'm pretty sure this function needs to call slapi_mods_done(&smods) after the internal modify operation.
*** ldbm_config.c.~1.6.~ 2006-04-11 09:48:11.000000000 -0600 --- ldbm_config.c 2006-10-12 15:00:22.000000000 -0600 *************** *** 1760,1764 **** --- 1760,1765 ---- slapi_mods_get_ldapmods_byref(&smods), NULL, NULL, li->li_identity, 0); slapi_modify_internal_pb(&pb); + slapi_mods_done(&smods); pblock_done(&pb); }
Yep, it's a leak... Good catch!
Reviewed by: nhosoi (Thanks!) Files: see diff Branch: HEAD Fix Description: Just needed to call slapi_mods_done(&smods) after the call to slapi_modify_internal_pb(). This is the same as in the other places in the server that perform an internal modify operation. Platforms tested: RHEL4 Flag Day: no Doc impact: no Checking in ldbm_config.c; /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_config.c,v <-- ldbm_config.c new revision: 1.7; previous revision: 1.6 done
Memory leak not seen anymore by valgrind.