summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Moore <awokd@danwin1210.me>2020-01-01 09:59:09 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-03-04 16:07:09 +0000
commit53e282acc04d7a8de6ddf5c9453666c02f4d8c43 (patch)
treecd8df23014068e8fc52e90d65a69d96446bc34da /src
parentb753006f38976f8735864251e941b9aa2f774f54 (diff)
vc/amd/agesa/f14/Proc/Mem: Fix uninitialized variable
Uninitialized variable will contain an arbitrary value left from earlier computations. This issue has already been addressed in the f15tn and f16kb versions of this same file, so am backporting the fix. Change-Id: Id876107265689e08ad6760e514a4911f32b53da7 Signed-off-by: Joe Moore <awokd@danwin1210.me> Found-by: Coverity CID 1241856 Reviewed-on: https://review.coreboot.org/c/coreboot/+/38048 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Frans Hendriks <fhendriks@eltan.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/vendorcode/amd/agesa/f14/Proc/Mem/Feat/S3/mfs3.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vendorcode/amd/agesa/f14/Proc/Mem/Feat/S3/mfs3.c b/src/vendorcode/amd/agesa/f14/Proc/Mem/Feat/S3/mfs3.c
index 4963b4b056..a19b8bd868 100644
--- a/src/vendorcode/amd/agesa/f14/Proc/Mem/Feat/S3/mfs3.c
+++ b/src/vendorcode/amd/agesa/f14/Proc/Mem/Feat/S3/mfs3.c
@@ -249,6 +249,7 @@ MemFS3GetDeviceList (
// Base on the size of the device list, apply for a buffer for it.
AllocHeapParams.RequestedBufferSize = BufferSize + sizeof (DEVICE_BLOCK_HEADER);
AllocHeapParams.BufferHandle = AMD_S3_NB_INFO_BUFFER_HANDLE;
+ AllocHeapParams.Persist = HEAP_S3_RESUME;
AGESA_TESTPOINT (TpIfBeforeAllocateMemoryS3SaveBuffer, StdHeader);
if (HeapAllocateBuffer (&AllocHeapParams, StdHeader) != AGESA_SUCCESS) {
return AGESA_FATAL;