Revision: 16719
http://sourceforge.net/p/edk2/code/16719
Author: vanjeff
Date: 2015-02-03 13:37:12 +0000 (Tue, 03 Feb 2015)
Log Message:
-----------
MdeModulePkg DxeCore: Enhance memory profile code to handle possible NULL
FilePath.
(Sync patch r16595 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/16595
Modified Paths:
--------------
branches/UDK2014.SP1/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c
Modified: branches/UDK2014.SP1/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c
===================================================================
--- branches/UDK2014.SP1/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c
2015-02-03 13:36:24 UTC (rev 16718)
+++ branches/UDK2014.SP1/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c
2015-02-03 13:37:12 UTC (rev 16719)
@@ -1,7 +1,7 @@
/** @file
Support routines for UEFI memory profile.
- Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2015, 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
@@ -483,13 +483,15 @@
EFI_GUID *FileName;
FileName = NULL;
- ThisFilePath = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) FilePath;
- while (!IsDevicePathEnd (ThisFilePath)) {
- FileName = EfiGetNameGuidFromFwVolDevicePathNode (ThisFilePath);
- if (FileName != NULL) {
- break;
+ if (FilePath != NULL) {
+ ThisFilePath = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) FilePath;
+ while (!IsDevicePathEnd (ThisFilePath)) {
+ FileName = EfiGetNameGuidFromFwVolDevicePathNode (ThisFilePath);
+ if (FileName != NULL) {
+ break;
+ }
+ ThisFilePath = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) NextDevicePathNode
(ThisFilePath);
}
- ThisFilePath = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) NextDevicePathNode
(ThisFilePath);
}
return FileName;
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits