SecurityPkg/RngDxe: Correctly update mAvailableAlgoArrayCount

mAvailableAlgoArrayCount holds the count of available RNG algorithms.
In a following patch, its value will be used to prevent the
EFI_RNG_PROTOCOL to be installed if no RNG algorithm is available.

Correctly set/reset the value for all implementations.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Pierre Gondois
2022-11-24 17:17:54 +01:00
committed by mergify[bot]
parent aa1cd447b3
commit bfb574db11
2 changed files with 9 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ FreeAvailableAlgorithms (
VOID
)
{
mAvailableAlgoArrayCount = 0;
FreePool (mAvailableAlgoArray);
return;
}