From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: More than 10 MX records returned) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=siyuan.fu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 441A72214E322 for ; Tue, 12 Dec 2017 18:11:18 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2017 18:15:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,396,1508828400"; d="scan'208";a="2268616" Received: from sfu5-mobl.ccr.corp.intel.com ([10.239.192.226]) by orsmga007.jf.intel.com with ESMTP; 12 Dec 2017 18:15:56 -0800 From: Fu Siyuan To: edk2-devel@lists.01.org Cc: Ye Ting , Wu Jiaxin , Wang Fan Date: Wed, 13 Dec 2017 10:15:52 +0800 Message-Id: <20171213021552.1032-1-siyuan.fu@intel.com> X-Mailer: git-send-email 2.13.0.windows.1 Subject: [Patch] MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 02:11:19 -0000 This patch fixes a bug in Ip4ConfigProtocol, that new created IP interface is not freed if Open ARP protocol failed. Cc: Ye Ting Cc: Wu Jiaxin Cc: Wang Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan --- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index fc5812e4ab..ac48ad2584 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -727,6 +727,7 @@ Ip4ConfigProtocol ( EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER ); if (EFI_ERROR (Status)) { + Ip4FreeInterface (IpIf, IpInstance); goto ON_ERROR; } } -- 2.13.0.windows.1