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 <liming.gao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Star Zeng 2016-01-29 16:24:10 +08:00
parent 82ea9a6b59
commit 09159a29d1
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
UEFI Memory pool management functions. UEFI Memory pool management functions.
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 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 // portion of that memory type has been freed. If it has, then free the
// list entry for that memory type // 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); RemoveEntryList (&Pool->Link);
CoreFreePoolI (Pool); CoreFreePoolI (Pool);
} }