From 09159a29d1b9a35745a033fd6434df264a751d0e Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Fri, 29 Jan 2016 16:24:10 +0800 Subject: [PATCH] MdeModulePkg DxeCore: Missing change for OEM reserved memory type at R17460 At the end of CoreFreePoolI(), the check to see if it is a specific memory type should also cover OEM reserved memory type. It was missed when adding OEM reserved memory type support at R17460. Cc: Liming Gao Cc: Feng Tian Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Mem/Pool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c index e5fee1abfc..ad9a85feaf 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Pool.c +++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c @@ -1,7 +1,7 @@ /** @file UEFI Memory pool management functions. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -658,11 +658,11 @@ CoreFreePoolI ( } // - // If this is an OS specific memory type, then check to see if the last + // If this is an OS/OEM specific memory type, then check to see if the last // portion of that memory type has been freed. If it has, then free the // list entry for that memory type // - if ((INT32)Pool->MemoryType < 0 && Pool->Used == 0) { + if (((UINT32) Pool->MemoryType >= MEMORY_TYPE_OEM_RESERVED_MIN) && Pool->Used == 0) { RemoveEntryList (&Pool->Link); CoreFreePoolI (Pool); } -- 2.39.2