Minor code enhancement.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9792 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gikidy 2010-01-18 07:20:22 +00:00
parent 920cb92642
commit cd730ec08d
1 changed files with 6 additions and 2 deletions

View File

@ -567,7 +567,9 @@ BdsExpandPartitionPartialDevicePathToFull (
TempNewDevicePath = CachedDevicePath; TempNewDevicePath = CachedDevicePath;
CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath); CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);
if (TempNewDevicePath != NULL) {
FreePool(TempNewDevicePath); FreePool(TempNewDevicePath);
}
} else { } else {
TempNewDevicePath = CachedDevicePath; TempNewDevicePath = CachedDevicePath;
CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath); CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);
@ -616,7 +618,9 @@ BdsExpandPartitionPartialDevicePathToFull (
} }
} }
if (CachedDevicePath != NULL) {
FreePool (CachedDevicePath); FreePool (CachedDevicePath);
}
if (BlockIoBuffer != NULL) { if (BlockIoBuffer != NULL) {
FreePool (BlockIoBuffer); FreePool (BlockIoBuffer);
} }