summaryrefslogtreecommitdiffstats
path: root/src/usr/errl/errlmanager.C
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2013-12-04 15:17:44 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-12-04 16:09:20 -0600
commit086c3ab88f98a92bee73a811b919ddfb7858dae5 (patch)
tree77c3cbf1805c2626de39d6237b4762de962d503f /src/usr/errl/errlmanager.C
parent1bec07dc7fbaeef84385e18a775ac93d712fcb9d (diff)
downloadtalos-hostboot-086c3ab88f98a92bee73a811b919ddfb7858dae5.tar.gz
talos-hostboot-086c3ab88f98a92bee73a811b919ddfb7858dae5.zip
fix bug that caused double free in errlmanager
code was incorrectly returning the pointer to a msg that was successfully sent to the FSP; result was that the shutdown code would try to free the msg, when it had already been processed. Change-Id: I37a02187db69d5c49f486b6a0d7c94a33db66973 CQ: SW235512 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7537 Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl/errlmanager.C')
-rw-r--r--src/usr/errl/errlmanager.C10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C
index 48c188374..05221f034 100644
--- a/src/usr/errl/errlmanager.C
+++ b/src/usr/errl/errlmanager.C
@@ -515,9 +515,15 @@ msg_t *ErrlManager::sendErrLogToMbox ( errlHndl_t& io_err )
if (iv_isMboxEnabled)
{
errlHndl_t l_err = MBOX::send( MBOX::FSP_ERROR_MSGQ, msg );
- if( l_err )
+ if( !l_err )
{
- TRACFCOMP(g_trac_errl, ERR_MRK "Failed sending error log to FSP");
+ // clear this - we're done with the message;
+ // the receiver will free the storage when it's done
+ msg = NULL;
+ }
+ else
+ {
+ TRACFCOMP(g_trac_errl, ERR_MRK"Failed sending error log to FSP");
//Free the extra data due to the error
if( (msg != NULL) && (msg->extra_data != NULL) )
OpenPOWER on IntegriCloud