From 463d994f9c43bcfc522ed5153bfbff654fba14c5 Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Fri, 25 Jan 2019 08:54:00 +0800 Subject: [PATCH] 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 --- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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: -- 2.39.2