diff options
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Image/Image.c')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Image/Image.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index daf5fd180b..e227f3a6bf 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -74,6 +74,7 @@ LOADED_IMAGE_PRIVATE_DATA mCorePrivateImage = { 0, // Machine
NULL, // Ebc
NULL, // RuntimeData
+ NULL, // DeviceHandleDevicePath
};
@@ -644,6 +645,7 @@ Returns: if (!EFI_ERROR (Status)) {
FilePathSize = CoreDevicePathSize (HandleFilePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);
FilePath = (EFI_DEVICE_PATH_PROTOCOL *) ( ((UINT8 *)FilePath) + FilePathSize );
+ Image->DeviceHandleDevicePath = CoreDuplicateDevicePath (HandleFilePath);
}
//
@@ -656,6 +658,7 @@ Returns: Image->Info.FilePath = CoreDuplicateDevicePath (FilePath);
Image->Info.ParentHandle = ParentImageHandle;
+
if (NumberOfPages != NULL) {
Image->NumberOfPages = *NumberOfPages ;
} else {
@@ -1170,6 +1173,10 @@ Returns: CoreFreePool (Image->Info.FilePath);
}
+ if (Image->DeviceHandleDevicePath != NULL) {
+ CoreFreePool (Image->DeviceHandleDevicePath);
+ }
+
if (Image->FixupData != NULL) {
CoreFreePool (Image->FixupData);
}
|