summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2019-09-07 14:11:31 +0200
committerLaszlo Ersek <lersek@redhat.com>2019-10-09 09:40:10 +0200
commitbf7249df9cbd0b5096f8f737b2439b6d17be89c3 (patch)
treeda4f44629b820202b28748a46d9f208e2c73b178 /NetworkPkg
parentc486a33049bbe59eed99255fa772fba63cdbb73a (diff)
downloadedk2-bf7249df9cbd0b5096f8f737b2439b6d17be89c3.tar.gz
edk2-bf7249df9cbd0b5096f8f737b2439b6d17be89c3.tar.bz2
edk2-bf7249df9cbd0b5096f8f737b2439b6d17be89c3.zip
NetworkPkg: fix CloseProtocol & UninstallMultipleProtocolInterfaces calls
Both the "ControllerHandle" parameter of CloseProtocol() and the "Handle" parameter of UninstallMultipleProtocolInterfaces() have type EFI_HANDLE, not (EFI_HANDLE*). This patch fixes actual bugs. The issues have been dormant likely because they are on error paths. (Or, in case of TlsAuthConfigDxe, because the driver is unloaded likely very infrequently.) Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/DnsDxe/DnsDriver.c4
-rw-r--r--NetworkPkg/IScsiDxe/IScsiConfig.c2
-rw-r--r--NetworkPkg/Ip4Dxe/Ip4Driver.c2
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Driver.c2
-rw-r--r--NetworkPkg/Mtftp4Dxe/Mtftp4Driver.c2
-rw-r--r--NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/NetworkPkg/DnsDxe/DnsDriver.c b/NetworkPkg/DnsDxe/DnsDriver.c
index 94d072159a..ad007da8b7 100644
--- a/NetworkPkg/DnsDxe/DnsDriver.c
+++ b/NetworkPkg/DnsDxe/DnsDriver.c
@@ -1145,7 +1145,7 @@ Dns4ServiceBindingCreateChild (
DnsSb->ConnectUdp->UdpHandle,
&gEfiUdp4ProtocolGuid,
gDns4DriverBinding.DriverBindingHandle,
- ChildHandle
+ *ChildHandle
);
gBS->UninstallMultipleProtocolInterfaces (
@@ -1388,7 +1388,7 @@ Dns6ServiceBindingCreateChild (
DnsSb->ConnectUdp->UdpHandle,
&gEfiUdp6ProtocolGuid,
gDns6DriverBinding.DriverBindingHandle,
- ChildHandle
+ *ChildHandle
);
gBS->UninstallMultipleProtocolInterfaces (
diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiConfig.c
index b876da7f5c..d773849fd3 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfig.c
+++ b/NetworkPkg/IScsiDxe/IScsiConfig.c
@@ -3852,7 +3852,7 @@ IScsiConfigFormInit (
);
if (CallbackInfo->RegisteredHandle == NULL) {
gBS->UninstallMultipleProtocolInterfaces (
- &CallbackInfo->DriverHandle,
+ CallbackInfo->DriverHandle,
&gEfiDevicePathProtocolGuid,
&mIScsiHiiVendorDevicePath,
&gEfiHiiConfigAccessProtocolGuid,
diff --git a/NetworkPkg/Ip4Dxe/Ip4Driver.c b/NetworkPkg/Ip4Dxe/Ip4Driver.c
index ebd4dec1df..62be8b681a 100644
--- a/NetworkPkg/Ip4Dxe/Ip4Driver.c
+++ b/NetworkPkg/Ip4Dxe/Ip4Driver.c
@@ -891,7 +891,7 @@ Ip4ServiceBindingCreateChild (
);
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces (
- ChildHandle,
+ *ChildHandle,
&gEfiIp4ProtocolGuid,
&IpInstance->Ip4Proto,
NULL
diff --git a/NetworkPkg/Ip6Dxe/Ip6Driver.c b/NetworkPkg/Ip6Dxe/Ip6Driver.c
index 7dc9e45af7..63d8428dbc 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Driver.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Driver.c
@@ -888,7 +888,7 @@ Ip6ServiceBindingCreateChild (
);
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces (
- ChildHandle,
+ *ChildHandle,
&gEfiIp6ProtocolGuid,
&IpInstance->Ip6Proto,
NULL
diff --git a/NetworkPkg/Mtftp4Dxe/Mtftp4Driver.c b/NetworkPkg/Mtftp4Dxe/Mtftp4Driver.c
index ae9e65544a..06c4e202d3 100644
--- a/NetworkPkg/Mtftp4Dxe/Mtftp4Driver.c
+++ b/NetworkPkg/Mtftp4Dxe/Mtftp4Driver.c
@@ -592,7 +592,7 @@ Mtftp4ServiceBindingCreateChild (
MtftpSb->ConnectUdp->UdpHandle,
&gEfiUdp4ProtocolGuid,
gMtftp4DriverBinding.DriverBindingHandle,
- ChildHandle
+ *ChildHandle
);
goto ON_ERROR;
}
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c
index 18ee763002..c0870ab997 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c
@@ -39,7 +39,7 @@ TlsAuthConfigDxeUnload (
ASSERT (PrivateData->Signature == TLS_AUTH_CONFIG_PRIVATE_DATA_SIGNATURE);
gBS->UninstallMultipleProtocolInterfaces (
- &ImageHandle,
+ ImageHandle,
&gEfiCallerIdGuid,
PrivateData,
NULL