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;
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);
}