diff options
author | Bill Hoffa <wghoffa@us.ibm.com> | 2014-12-01 11:48:01 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-12-14 17:34:09 -0600 |
commit | 8f0edf314a9c9198d95b0c7598e269cf8b7f232a (patch) | |
tree | b6e09d66845e500bbaf036a40874aea461691044 /src/usr/vpd/test | |
parent | 9b53fb2a9083e62380f7bf2fb041378ef4de96ee (diff) | |
download | talos-hostboot-8f0edf314a9c9198d95b0c7598e269cf8b7f232a.tar.gz talos-hostboot-8f0edf314a9c9198d95b0c7598e269cf8b7f232a.zip |
IPMI Fru Inventory Record Creation
Change-Id: I9339e267ff7d2e2edbf4305d8c2d57f73f0c5eeb
RTC:108829
Depends-on:I3c0c4c7c14521f1b64af37d62e57a5947602ed11
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14666
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/vpd/test')
-rwxr-xr-x | src/usr/vpd/test/spdtest.H | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/usr/vpd/test/spdtest.H b/src/usr/vpd/test/spdtest.H index 83de74c7f..c94e8af98 100755 --- a/src/usr/vpd/test/spdtest.H +++ b/src/usr/vpd/test/spdtest.H @@ -736,7 +736,9 @@ class SPDTest: public CxxTest::TestSuite // Test on first DIMM only. theTarget = dimmList[0]; - uint8_t * theData = NULL; + //If theData is NULL, deviceRead will return the size + // need to give this an arbitrary size so test is still valid` + uint8_t * theData = static_cast<uint8_t*>(malloc( 0x1 )); size_t theSize = 0x0; // Invalid size of 0x0 cmds++; @@ -745,6 +747,12 @@ class SPDTest: public CxxTest::TestSuite theSize, DEVICE_SPD_ADDRESS( SPD::SPD_FIRST_NORM_KEYWORD ) ); + // clean up the data + if( NULL != theData ) + { + delete theData; + theData = NULL; + } if( NULL == err ) { fails++; |