From: Greg KH <gregkh@linuxfoundation.org>
To: Zilin Guan <zilin@seu.edu.cn>
Cc: hansg@kernel.org, mchehab@kernel.org,
sakari.ailus@linux.intel.com, andy@kernel.org,
hverkuil@kernel.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev,
jianhao.xu@seu.edu.cn
Subject: Re: [PATCH] media: atomisp: Fix memory leak in atomisp_fixed_pattern_table()
Date: Sun, 1 Feb 2026 09:10:12 +0100 [thread overview]
Message-ID: <2026020156-carry-progeny-168c@gregkh> (raw)
In-Reply-To: <20260201072107.1797351-1-zilin@seu.edu.cn>
On Sun, Feb 01, 2026 at 07:21:07AM +0000, Zilin Guan wrote:
> atomisp_v4l2_framebuffer_to_css_frame() allocates memory for
> raw_black_frame, which must be released via ia_css_frame_free().
> However, if sh_css_set_black_frame() fails, the function returns
> immediately without performing this cleanup, leading to a memory leak.
>
> Fix this by assigning the error code to ret and allowing the code to
> fall through to the ia_css_frame_free() call.
>
> Compile tested only. Issue found using a prototype static analysis tool
> and code review.
Please properly document this as per the rules we have for using tools
like this.
thanks,
greg k-h
next prev parent reply other threads:[~2026-02-01 8:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-01 7:21 [PATCH] media: atomisp: Fix memory leak in atomisp_fixed_pattern_table() Zilin Guan
2026-02-01 8:10 ` Greg KH [this message]
2026-02-01 12:43 ` Zilin Guan
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=2026020156-carry-progeny-168c@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=andy@kernel.org \
--cc=hansg@kernel.org \
--cc=hverkuil@kernel.org \
--cc=jianhao.xu@seu.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=zilin@seu.edu.cn \
/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