[PATCH v2] bootstd: Fix a memory leak in the efi manager bootflow

Simon Glass sjg at chromium.org
Wed Dec 13 21:38:55 CET 2023


> From: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> Date: Thu,  7 Dec 2023 14:36:36 +0200
>
> efi_get_var() allocates memory which has to be freed after the value of
> the variable is consumed. Free the memory properly
>
> Fixes: f2bfa0cb1794 ("bootstd: Make efi_mgr bootmeth work for non-sandbox setups")
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> ---
> Apologies for the quick resend but the previous patches wasn't compiling due to
> the missing #include <malloc.h>
>
> Changes since v1
> - Add #include <malloc.h> since it's needed for free()
>
>  boot/bootmeth_efi_mgr.c | 2 ++
>  1 file changed, 2 insertions(+)

Oops!

Reviewed-by: Mark Kettenis <kettenis at openbsd.org>

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list