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:
@@ -727,6 +727,7 @@ Ip4ConfigProtocol (
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Ip4FreeInterface (IpIf, IpInstance);
|
||||
goto ON_ERROR;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user