efi_loader: handle malloc() errors
authorVincent Stehlé <vincent.stehle@arm.com>
Tue, 1 Apr 2025 11:15:00 +0000 (13:15 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 11 Apr 2025 11:25:27 +0000 (13:25 +0200)
commit2dc04803b05ff189619d46acd137a47bedaf6193
tree88283a2b94d69630d11ed9815a72950de26a8bea
parentf5e0f2198ec1226b4fd0121439facc30cb886a2a
efi_loader: handle malloc() errors

The new_packagelist() function of the HII Protocols implementation is
calling malloc() without checking its return code; fix this.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_hii.c