summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-18 07:20:22 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-18 07:20:22 +0000
commitcd730ec08d8fc5afc557ae7f39c948998cd96bbb (patch)
tree1a83d6b519c1c3a080436a55ec09fb09538fcc11 /IntelFrameworkModulePkg
parent920cb926428be7049526140d523df379f6fe3ad1 (diff)
downloadedk2-platforms-cd730ec08d8fc5afc557ae7f39c948998cd96bbb.tar.xz
Minor code enhancement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9792 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
index 7a9756e1f1..e6b2fe4d17 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
@@ -567,7 +567,9 @@ BdsExpandPartitionPartialDevicePathToFull (
TempNewDevicePath = CachedDevicePath;
CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);
- FreePool(TempNewDevicePath);
+ if (TempNewDevicePath != NULL) {
+ FreePool(TempNewDevicePath);
+ }
} else {
TempNewDevicePath = CachedDevicePath;
CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);
@@ -616,7 +618,9 @@ BdsExpandPartitionPartialDevicePathToFull (
}
}
- FreePool (CachedDevicePath);
+ if (CachedDevicePath != NULL) {
+ FreePool (CachedDevicePath);
+ }
if (BlockIoBuffer != NULL) {
FreePool (BlockIoBuffer);
}