mirror of https://github.com/acidanthera/audk.git
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:
parent
63d425002a
commit
c5c5c980db
|
@ -209,7 +209,6 @@ InitUnitTestFramework (
|
|||
EFI_STATUS Status;
|
||||
UNIT_TEST_FRAMEWORK_HANDLE NewFrameworkHandle;
|
||||
UNIT_TEST_FRAMEWORK *NewFramework;
|
||||
UNIT_TEST_SAVE_HEADER *SavedState;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
NewFramework = NULL;
|
||||
|
@ -264,8 +263,7 @@ InitUnitTestFramework (
|
|||
// If there is a persisted context, load it now.
|
||||
//
|
||||
if (DoesCacheExist (NewFrameworkHandle)) {
|
||||
SavedState = (UNIT_TEST_SAVE_HEADER *)NewFramework->SavedState;
|
||||
Status = LoadUnitTestCache (NewFrameworkHandle, &SavedState);
|
||||
Status = LoadUnitTestCache (NewFrameworkHandle, (UNIT_TEST_SAVE_HEADER**)(&NewFramework->SavedState));
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// Don't actually report it as an error, but emit a warning.
|
||||
|
|
Loading…
Reference in New Issue