OpenSolaris

Printable Version Enter a New Search
Bug ID 6675806
Synopsis libipmi: ipmi_fru_read() can leak memory on failure
State 10-Fix Delivered (Fix available in build)
Category:Subcategory library:fm
Keywords libipmi
Responsible Engineer Robert Johnston
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_87
Fixed In snv_87
Release Fixed solaris_nevada(snv_87) , solaris_10u6(s10u6_01) (Bug ID:2161078)
Related Bugs
Submit Date 14-March-2008
Last Update Date 9-April-2008
Description
ipmi_fru_read() can leak memory on failure.  Client code passes a handle to ipmi_fru_read() which mallocs a bunch of space and attaches the handle to it and assumes the caller will eventually free it.  However, if ipmi_fru_read() fails after the malloc, it doesn't currently free the memory, and we can't expect the caller to free it, in that situation, so we have a potential leak that needs to be sealed.  There are two error paths in ipmi_fru_read() that are after the malloc.  We need to free the memory before returning in both those places.
Work Around
N/A
Comments
N/A