UnitTestFrameworkPkg/UnitTestLib: Correct dereferred pointer
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2609 SavedState is not sticky, copied pointer update will not change source pointer Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
This commit is contained in:
@ -209,7 +209,6 @@ InitUnitTestFramework (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UNIT_TEST_FRAMEWORK_HANDLE NewFrameworkHandle;
|
UNIT_TEST_FRAMEWORK_HANDLE NewFrameworkHandle;
|
||||||
UNIT_TEST_FRAMEWORK *NewFramework;
|
UNIT_TEST_FRAMEWORK *NewFramework;
|
||||||
UNIT_TEST_SAVE_HEADER *SavedState;
|
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
NewFramework = NULL;
|
NewFramework = NULL;
|
||||||
@ -264,8 +263,7 @@ InitUnitTestFramework (
|
|||||||
// If there is a persisted context, load it now.
|
// If there is a persisted context, load it now.
|
||||||
//
|
//
|
||||||
if (DoesCacheExist (NewFrameworkHandle)) {
|
if (DoesCacheExist (NewFrameworkHandle)) {
|
||||||
SavedState = (UNIT_TEST_SAVE_HEADER *)NewFramework->SavedState;
|
Status = LoadUnitTestCache (NewFrameworkHandle, (UNIT_TEST_SAVE_HEADER**)(&NewFramework->SavedState));
|
||||||
Status = LoadUnitTestCache (NewFrameworkHandle, &SavedState);
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// Don't actually report it as an error, but emit a warning.
|
// Don't actually report it as an error, but emit a warning.
|
||||||
|
Reference in New Issue
Block a user