Small code refinement in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10492 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1433,6 +1433,9 @@ DriverSampleUnload (
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
|
||||
ASSERT (PrivateData != NULL);
|
||||
|
||||
if (DriverHandle[0] != NULL) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
DriverHandle[0],
|
||||
@@ -1463,15 +1466,13 @@ DriverSampleUnload (
|
||||
HiiRemovePackages (PrivateData->HiiHandle[1]);
|
||||
}
|
||||
|
||||
if (PrivateData != NULL) {
|
||||
for (Index = 0; Index < NAME_VALUE_NAME_NUMBER; Index++) {
|
||||
if (PrivateData->NameValueName[Index] != NULL) {
|
||||
FreePool (PrivateData->NameValueName[Index]);
|
||||
}
|
||||
for (Index = 0; Index < NAME_VALUE_NAME_NUMBER; Index++) {
|
||||
if (PrivateData->NameValueName[Index] != NULL) {
|
||||
FreePool (PrivateData->NameValueName[Index]);
|
||||
}
|
||||
FreePool (PrivateData);
|
||||
PrivateData = NULL;
|
||||
}
|
||||
FreePool (PrivateData);
|
||||
PrivateData = NULL;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user