mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
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>
This commit is contained in:
committed by
Ilias Apalodimas
parent
5753dc3f65
commit
9a64eecad6
@@ -1131,7 +1131,7 @@ efi_status_t efi_net_register(struct udevice *dev)
|
||||
struct efi_net_obj *netobj;
|
||||
void *transmit_buffer = NULL;
|
||||
uchar **receive_buffer = NULL;
|
||||
size_t *receive_lengths;
|
||||
size_t *receive_lengths = NULL;
|
||||
int i, j;
|
||||
|
||||
if (!dev) {
|
||||
|
||||
Reference in New Issue
Block a user