diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2013-06-28 09:44:49 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-06-28 14:21:37 -0500 |
commit | 9bd9d3d205199e1aafdf78caddadb1de413df7e7 (patch) | |
tree | 3a32c2a9b68cdc7990be9d8a056d10d5f0e6ab62 /src/usr/targeting | |
parent | 9b19b8e279fb596cb22ae59535b1d275ea523309 (diff) | |
download | talos-hostboot-9bd9d3d205199e1aafdf78caddadb1de413df7e7.tar.gz talos-hostboot-9bd9d3d205199e1aafdf78caddadb1de413df7e7.zip |
Fix mailbox memory allocation error on attribute sync
Change-Id: If156faa95769b70731dc77f7b9801ff3ea743556
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5239
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting')
-rw-r--r-- | src/usr/targeting/attrsync.C | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/usr/targeting/attrsync.C b/src/usr/targeting/attrsync.C index ca70f8658..70494a691 100644 --- a/src/usr/targeting/attrsync.C +++ b/src/usr/targeting/attrsync.C @@ -180,7 +180,7 @@ namespace TARGETING if ( ATTR_SYNC_SECTION_TO_HB == l_pMsg->type ) { TARG_DBG( "HB Attribute Sync Section message type received " - "from the FSP"); + "from the FSP"); // get the section id l_page.sectionId = ATTR_SYNC_GET_SECTION_ID(l_pMsg->data[0]); @@ -231,11 +231,15 @@ namespace TARGETING { iv_pages.push_back(l_page); } + + // Free memory allocated for message + msg_free( l_pMsg ); + l_pMsg = NULL; } else if ( ATTR_SYNC_COMPLETE_TO_HB == l_pMsg->type ) { TARG_DBG( "HB Attribute Sync Complete message type " - "received from the FSP"); + "received from the FSP"); l_sync_complete = true; @@ -299,11 +303,6 @@ namespace TARGETING { TARG_ERR( "WARNING: Invalid message type [0x%x] received " "from the FSP, ignoring...", l_pMsg->type); - } - - // Free memory allocated for message - if ( msg_is_async(l_pMsg) ) - { msg_free( l_pMsg ); l_pMsg = NULL; } @@ -477,7 +476,7 @@ namespace TARGETING free( i_msg->extra_data ); } } - + return l_errl; } @@ -514,7 +513,7 @@ namespace TARGETING if( l_errl ) { TRACFCOMP(g_trac_targeting, - "Error returned when syncing section type %d to FSP", + "Error returned when syncing section type %d to FSP", section_type[i]); break; } @@ -547,7 +546,7 @@ namespace TARGETING if (l_errl) { TARG_ERR( "Error registering the Hostboot message queue with " - "mailbox service." ); + "mailbox service." ); break; } |