Resolves: bug 440474
Bug Description: A number of memory leaks in the memberOf plug-in occur
various operations on member attributes. These leaks were discovered
valgrind to run ns-slapd.
Reviewed by: ???
Files: see diff
Fix Description: We were allocating a Slapi_Mods in the modify callback
calling slapi_mods_free() would cause a double free. This is because
initialing the Slapi_Mods by passing in the LDAPMod array from
in the pblock. This will make slapi_mods_free() do a free of the
but do_modify() is responsible for freeing the LDAPMod array in the
solution is to initialize the Slapi_Mods by reference so
try to free the LDAPMod array.
There were 4 places where we were allocating a Slapi_Entry by calling
slapi_search_internal_get_entry(), but never freeing the entry when we
finished with it.
We were allocating two Slapi_Value arrays with slapi_ch_malloc(), but were
never calling slapi_ch_free() when we were finished.
Platforms tested: RHEL5.1 x86_64
Flag Day: No.
Doc impact: None.