summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootImpl.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
index 4f84e59a21..6f10bcff39 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
@@ -77,11 +77,19 @@ HttpBootUninstallCallback (
IN HTTP_BOOT_PRIVATE_DATA *Private
)
{
+ EFI_HANDLE ControllerHandle;
+
if (Private->HttpBootCallback == &Private->LoadFileCallback) {
+ if (!Private->UsingIpv6) {
+ ControllerHandle = Private->Ip4Nic->Controller;
+ } else {
+ ControllerHandle = Private->Ip6Nic->Controller;
+ }
+
gBS->UninstallProtocolInterface (
- Private->Controller,
+ ControllerHandle,
&gEfiHttpBootCallbackProtocolGuid,
- &Private->HttpBootCallback
+ Private->HttpBootCallback
);
Private->HttpBootCallback = NULL;
}