From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Ajay Rajera <newajay.11r@gmail.com>, linux-erofs@lists.ozlabs.org
Cc: xiang@kernel.org
Subject: Re: [PATCH v2 2/2] erofs-utils: lib: fix memory leak in erofs_gzran_builder_init error path
Date: Sat, 21 Mar 2026 15:21:06 +0800 [thread overview]
Message-ID: <e06d4f47-5fd8-4a7d-95c8-b4fa0fde62d6@linux.alibaba.com> (raw)
In-Reply-To: <20260321062604.1905-2-newajay.11r@gmail.com>
On 2026/3/21 14:26, Ajay Rajera wrote:
> When inflateInit2() fails, erofs_gzran_builder_init() returns an ERR_PTR(-EFAULT)
> but forgets to free the previously allocated erofs_gzran_builder struct (gb),
> resulting in a memory leak.
>
> Fix by calling free(gb) before returning the error.
>
> Signed-off-by: Ajay Rajera <newajay.11r@gmail.com>
The same issue.
next prev parent reply other threads:[~2026-03-21 7:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 6:26 [PATCH v2 1/2] erofs-utils: fuse: add missing return on getattr error Ajay Rajera
2026-03-21 6:26 ` [PATCH v2 2/2] erofs-utils: lib: fix memory leak in erofs_gzran_builder_init error path Ajay Rajera
2026-03-21 7:21 ` Gao Xiang [this message]
2026-03-21 9:34 ` Ajay Rajera
2026-03-21 6:43 ` [PATCH v2 1/2] erofs-utils: fuse: add missing return on getattr error Gao Xiang
2026-03-21 7:18 ` Ajay Rajera
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=e06d4f47-5fd8-4a7d-95c8-b4fa0fde62d6@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=newajay.11r@gmail.com \
--cc=xiang@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox