efi_loader: Prevent free of uninitialised pointer
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Wed, 2 Jul 2025 10:01:38 +0000 (11:01 +0100)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Thu, 3 Jul 2025 08:32:49 +0000 (11:32 +0300)
commit9a64eecad675f99f1ddf14184433a46728f7e047
treeaaf14e9f3905147dbf86e2598111d8255ca667ca
parent5753dc3f6572d42057a262f0e57e904e5c9cd9bc
efi_loader: Prevent free of uninitialised pointer

Taking a goto to out_of_resources before receive_lengths is assigned
will result in an attempt to free an unitialised pointer. Instead
initialise receive_lengths to NULL on declaration to prevent this from
occurring.

This issue was found by Smatch.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_net.c