https://bugs.openldap.org/show_bug.cgi?id=10349
Issue ID: 10349 Summary: Free ch_calloc-allocated memory in error paths Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: alexguo1023@gmail.com Target Milestone: ---
Created attachment 1078 --> https://bugs.openldap.org/attachment.cgi?id=1078&action=edit Free ch_calloc-allocated memory in error paths
1. In aa_operational, bv_allowed and bv_effective are allocated via ch_calloc. If ja == 0 or je == 0, these memory objects are never freed and do not escape the function, causing potential memory leak.
2. In memberof_db_init, the memory allocated by ch_calloc isn’t released on error paths, leading to another potential leak.
https://bugs.openldap.org/show_bug.cgi?id=10349
--- Comment #1 from Alex Guo alexguo1023@gmail.com --- *** Issue 10350 has been marked as a duplicate of this issue. ***