NetworkPkg: Protocol Uninstallation Cleanup

Use UEFILib provided protocol uninstallation abstraction
instead of direct API for a proper cleanup.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1444

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
Ashish Singhal
2019-01-11 03:27:08 +08:00
committed by Jiaxin Wu
parent 5bc96263ea
commit 22b35e8bd1
6 changed files with 35 additions and 70 deletions

View File

@ -1327,16 +1327,11 @@ HttpBootDxeDriverEntryPoint (
&gHttpBootDxeComponentName2
);
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces(
ImageHandle,
&gEfiDriverBindingProtocolGuid,
&gHttpBootIp4DxeDriverBinding,
&gEfiComponentName2ProtocolGuid,
&gHttpBootDxeComponentName2,
&gEfiComponentNameProtocolGuid,
&gHttpBootDxeComponentName,
NULL
);
EfiLibUninstallDriverBindingComponentName2(
&gHttpBootIp4DxeDriverBinding,
&gHttpBootDxeComponentName,
&gHttpBootDxeComponentName2
);
}
return Status;
}