[PATCH] tools: Fix potential memory leak in aisimage.c
Quentin Schulz
quentin.schulz at cherry.de
Fri Apr 18 15:52:01 CEST 2025
Hi,
On 4/18/25 10:19 AM, ant.v.moryakov at gmail.com wrote:
> From: Maks Mishin <maks.mishinFZ at gmail.com>
>
We don't really like empty commit logs, could you please provide some
information on what this fixes and how?
e.g. here you could say something along the lines of:
line gets realloc'ed in getline() so we need to free it.
> Signed-off-by: Maks Mishin <maks.mishinFZ at gmail.com>
Same remark as other patches in this series, are you Maks? If no, we
need an additional Signed-off-by, yours.
> ---
> tools/aisimage.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/aisimage.c b/tools/aisimage.c
> index b8b3ee32..6091c8d5 100644
> --- a/tools/aisimage.c
> +++ b/tools/aisimage.c
> @@ -346,6 +346,7 @@ static int aisimage_generate(struct image_tool_params *params,
> }
>
> }
> + free(line);
> fclose(fd);
>
> aishdr = ais_copy_image(params, aishdr);
The change seems fine to me though.
Cheers,
Quentin
More information about the U-Boot
mailing list