From: Jiaxin Wu Date: Fri, 25 Jan 2019 00:54:00 +0000 (+0800) Subject: MdeModulePkg/Ip4Dxe: Uninstall protocols when error happen in Driver Binding Start. X-Git-Tag: edk2-stable201903~180 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=463d994f9c43bcfc522ed5153bfbff654fba14c5 MdeModulePkg/Ip4Dxe: Uninstall protocols when error happen in Driver Binding Start. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1447 This patch is to uninstall Ip4ServiceBindingProtocol and Ip4Config2Protocol when error happen in Driver Binding Start. Cc: Michael Turner Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin Signed-off-by: Michael Turner Reviewed-By: Ye Ting --- diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c index 0f25581414..87ec968e7b 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c @@ -1,7 +1,7 @@ /** @file The driver binding and service binding protocol for IP4 driver. -Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
This program and the accompanying materials @@ -664,10 +664,13 @@ Ip4DriverBindingStart ( return Status; UNINSTALL_PROTOCOL: - gBS->UninstallProtocolInterface ( + gBS->UninstallMultipleProtocolInterfaces ( ControllerHandle, &gEfiIp4ServiceBindingProtocolGuid, - &IpSb->ServiceBinding + &IpSb->ServiceBinding, + &gEfiIp4Config2ProtocolGuid, + Ip4Cfg2, + NULL ); FREE_SERVICE: