|
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.
|