MdeModulePkg/Ip4Dxe: Clean up IP4 interface if failed to open ARP protocol.

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>
This commit is contained in:
Fu Siyuan 2017-12-13 10:07:46 +08:00
parent 280a913ac5
commit 7155d0a68c
1 changed files with 1 additions and 0 deletions

View File

@ -727,6 +727,7 @@ Ip4ConfigProtocol (
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
if (EFI_ERROR (Status)) {
Ip4FreeInterface (IpIf, IpInstance);
goto ON_ERROR;
}
}