Make sure the return value of MapKey is correct by moving the assignment into memory lock protection region

Signed-off-by: erictian
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11700 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
erictian 2011-05-25 03:04:31 +00:00
parent 62ba7e1704
commit e439df5074
1 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,7 @@
/** @file
UEFI Memory page management functions.
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
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
@ -1516,11 +1516,6 @@ CoreGetMemoryMap (
Status = EFI_SUCCESS;
Done:
CoreReleaseMemoryLock ();
CoreReleaseGcdMemoryLock ();
//
// Update the map key finally
//
@ -1528,6 +1523,10 @@ Done:
*MapKey = mMemoryMapKey;
}
CoreReleaseMemoryLock ();
CoreReleaseGcdMemoryLock ();
*MemoryMapSize = BufferSize;
return Status;