Skip to content

Commit

Permalink
fix: Initialize linked list at entry
Browse files Browse the repository at this point in the history
Correct issue where linked list is not intiialized and if Finished is called
before TestInit crash will occur.

Signed-off-by: Jeff Brasen <[email protected]>
Reviewed-by: Ashish Singhal <[email protected]>
  • Loading branch information
jbrasen authored and jgarver committed Sep 6, 2023
1 parent 925f0cd commit 3bc2c62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ ConstructMemoryTestRanges (
MEMORY_TEST_RANGE *MemoryTestRange;
UINTN Offset;

InitializeListHead (&Private->MemoryTestList);
NonTestedRangeNode = GetFirstNode (&Private->NonTestedMemList);

while (NonTestedRangeNode != &Private->NonTestedMemList) {
Expand Down Expand Up @@ -804,9 +803,10 @@ GenericMemoryTestEntryPoint (
}

//
// Initialize several internal link list
// Initialize several internal link lists
//
InitializeListHead (&mGenericMemoryTestPrivate.NonTestedMemList);
InitializeListHead (&mGenericMemoryTestPrivate.MemoryTestList);

//
// Install the protocol
Expand Down

0 comments on commit 3bc2c62

Please sign in to comment.