]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol.
authorFu Siyuan <siyuan.fu@intel.com>
Wed, 13 Dec 2017 02:07:46 +0000 (10:07 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Fri, 22 Dec 2017 05:48:24 +0000 (13:48 +0800)
This patch fixes a bug in Ip4ConfigProtocol, that new created IP interface is
not freed if Open ARP protocol failed.

Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c

index fc5812e4ab55e180f8a21ff35fc4ecaec63a0455..ac48ad25841054a7b8e41e40520314be36c3abd7 100644 (file)
@@ -727,6 +727,7 @@ Ip4ConfigProtocol (
                     EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
                     );\r
     if (EFI_ERROR (Status)) {\r
+      Ip4FreeInterface (IpIf, IpInstance);\r
       goto ON_ERROR;\r
     }\r
   }\r