aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeelesh Gupta <neelegup@linux.vnet.ibm.com>2015-07-13 10:36:22 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-11 15:43:48 +1000
commitebf9084d8a4d2f70e4e7d2c6a35cac2c7f6e2681 (patch)
treedb22dd3b2a20df7662bd2616ebd41b172efca9b2
parent7d29629bd980cbeceba357be044200657d065136 (diff)
downloadskiboot-ebf9084d8a4d2f70e4e7d2c6a35cac2c7f6e2681.zip
skiboot-ebf9084d8a4d2f70e4e7d2c6a35cac2c7f6e2681.tar.gz
skiboot-ebf9084d8a4d2f70e4e7d2c6a35cac2c7f6e2681.tar.bz2
fsp/ipmi: Fix an illegal memory access
The patch fixes an illegal access to the memory which has been freed. Fixes Coverity defect # 101858 Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/fsp/fsp-ipmi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/fsp/fsp-ipmi.c b/hw/fsp/fsp-ipmi.c
index bc425b1..750d144 100644
--- a/hw/fsp/fsp-ipmi.c
+++ b/hw/fsp/fsp-ipmi.c
@@ -87,13 +87,12 @@ static void fsp_ipmi_req_complete(struct fsp_msg *msg)
{
uint8_t status = (msg->resp->word1 >> 8) & 0xff;
uint32_t length = msg->resp->data.words[0];
- struct fsp_ipmi_msg *fsp_ipmi_msg;
+ struct fsp_ipmi_msg *fsp_ipmi_msg = msg->user_data;
struct ipmi_msg *ipmi_msg;
fsp_freemsg(msg);
if (status != FSP_STATUS_SUCCESS) {
- fsp_ipmi_msg = msg->user_data;
assert(fsp_ipmi_msg == fsp_ipmi.cur_msg);
ipmi_msg = &fsp_ipmi_msg->ipmi_msg;