diff options
author | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-18 07:20:22 +0000 |
---|---|---|
committer | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-18 07:20:22 +0000 |
commit | cd730ec08d8fc5afc557ae7f39c948998cd96bbb (patch) | |
tree | 1a83d6b519c1c3a080436a55ec09fb09538fcc11 /IntelFrameworkModulePkg | |
parent | 920cb926428be7049526140d523df379f6fe3ad1 (diff) | |
download | edk2-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.c | 8 |
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);
}
|