All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@cherry.de>
To: ant.v.moryakov@gmail.com, u-boot@lists.denx.de
Cc: Maks Mishin <maks.mishinFZ@gmail.com>
Subject: Re: [PATCH] tools: Fix potential memory leak in aisimage.c
Date: Fri, 18 Apr 2025 15:52:01 +0200	[thread overview]
Message-ID: <dc5c81a0-2d2d-4d6a-bfc1-189d7f08cbe1@cherry.de> (raw)
In-Reply-To: <20250418081958.12818-3-ant.v.moryakov@gmail.com>

Hi,

On 4/18/25 10:19 AM, ant.v.moryakov@gmail.com wrote:
> From: Maks Mishin <maks.mishinFZ@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@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

  reply	other threads:[~2025-04-18 13:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18  8:19 [PATCH] scripts: Fix potential null-deref ant.v.moryakov
2025-04-18  8:19 ` [PATCH] tools: Fix memory and descriptor leak ant.v.moryakov
2025-04-18 13:51   ` Quentin Schulz
2025-04-18  8:19 ` [PATCH] tools: Fix potential memory leak in aisimage.c ant.v.moryakov
2025-04-18 13:52   ` Quentin Schulz [this message]
2025-04-18  8:19 ` [PATCH] tools: image-host: Fix potential memory leak ant.v.moryakov
2025-04-18 13:52   ` Quentin Schulz
2025-04-18 13:51 ` [PATCH] scripts: Fix potential null-deref Quentin Schulz
2025-04-18 14:18   ` Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2025-04-18 17:49 [PATCH] tools: Fix potential memory leak in aisimage.c ant.v.moryakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc5c81a0-2d2d-4d6a-bfc1-189d7f08cbe1@cherry.de \
    --to=quentin.schulz@cherry.de \
    --cc=ant.v.moryakov@gmail.com \
    --cc=maks.mishinFZ@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.