efi_loader: fix handling of DHCP acknowledge
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 26 Nov 2022 15:44:38 +0000 (16:44 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 2 Dec 2022 18:17:24 +0000 (19:17 +0100)
commit1702055eb3010a9bd473f49565613899177aeb36
tree857fbaa82320dd2f8b03e18f48315662cc25fba7
parentf2833d451c0e5e0aecec4d431cbe4ffa21f2e433
efi_loader: fix handling of DHCP acknowledge

The dhcp command may be executed after the first UEFI command.
We should still update the EFI_PXE_BASE_CODE_PROTOCOL.

Don't leak content of prior acknowledge packages.

Handle failing allocation when calling malloc().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_net.c