[Fedora-directory-devel] Please Review: (440474) Various memory leaks in memberOf plug-in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=440474
Resolves: bug 440474
Bug Description: A number of memory leaks in the memberOf plug-in occur during various operations on member attributes. These leaks were discovered using
 valgrind to run ns-slapd.
Reviewed by: ???
Files: see diff
Branch: HEAD
Fix Description: We were allocating a Slapi_Mods in the modify callback and never calling slapi_mods_free() would cause a double free. This is because we are initialing the Slapi_Mods by passing in the LDAPMod array from SLAPI_MODIFY_MODS in the pblock. This will make slapi_mods_free() do a free of the LDAPMod elements, but do_modify() is responsible for freeing the LDAPMod array in the pblock. The solution is to initialize the Slapi_Mods by reference so slapi_mods_free() doesn't
 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 were
 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.
https://bugzilla.redhat.com/attachment.cgi?id=300297&action=diff

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
Fedora-directory-devel mailing list
Fedora-directory-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-devel

[Index of Archives]     [Fedora Directory Announce]     [Fedora Users]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [CentOS]     [Fedora SELinux]     [Big List of Linux Books]     [KDE Users]     [Fedora Art]     [Fedora Docs]

  Powered by Linux