mirror of https://github.com/acidanthera/audk.git
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:
parent
280a913ac5
commit
7155d0a68c
|
@ -727,6 +727,7 @@ Ip4ConfigProtocol (
|
||||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
Ip4FreeInterface (IpIf, IpInstance);
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue