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 <Michael.Turner@microsoft.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Signed-off-by: Michael Turner <Michael.Turner@microsoft.com>
Reviewed-By: Ye Ting <ting.ye@intel.com>
This commit is contained in:
Jiaxin Wu 2019-01-25 08:54:00 +08:00
parent 3103389043
commit 463d994f9c
1 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/** @file
The driver binding and service binding protocol for IP4 driver.
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
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: