From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Huihui Huang <hhhuang@smu.edu.sg>,
Hans de Goede <hansg@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Andy Shevchenko <andy@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: media: atomisp: fix memory leak of raw_black_frame
Date: Thu, 16 Apr 2026 11:18:28 +0300 [thread overview]
Message-ID: <aeCbVKLebxC9v-4r@ashevche-desk.local> (raw)
In-Reply-To: <aeCaPExt-sUiY-B9@valkosipuli.retiisi.eu>
On Thu, Apr 16, 2026 at 11:13:48AM +0300, Sakari Ailus wrote:
> On Thu, Apr 16, 2026 at 02:30:58PM +0800, Huihui Huang wrote:
> > Our code analyzer reported a memory leak in
> > drivers/staging/media/atomisp/pci/atomisp_cmd.c.
> >
> > In atomisp_fixed_pattern_table(), raw_black_frame is allocated by
> > atomisp_v4l2_framebuffer_to_css_frame(). If sh_css_set_black_frame()
> > fails, the function returns -ENOMEM directly without freeing
> > raw_black_frame. The allocated memory is only freed on the success
> > path.
> >
> > My patch adds the missing ia_css_frame_free() call before the error
> > return, to free raw_black_frame when sh_css_set_black_frame() fails.
> >
> > Signed-off-by: Huihui Huang <hhhuang@smu.edu.sg>
>
> Thanks for the patch.
>
> I believe the problem has been already addressed by
> <20260203163134.3901110-1-zilin@seu.edu.cn>. It's in my atomisp branch.
And exactly the way I suggested here, thanks, Sakari!
P.S.
It would be nice to see rather links to the Git commits in question, because
patch in the mailing list is just patch in the mailing list :-)
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-04-16 8:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 6:30 [PATCH] staging: media: atomisp: fix memory leak of raw_black_frame Huihui Huang
2026-04-16 8:06 ` Andy Shevchenko
2026-04-16 8:13 ` Sakari Ailus
2026-04-16 8:18 ` Andy Shevchenko [this message]
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=aeCbVKLebxC9v-4r@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=hhhuang@smu.edu.sg \
--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@iki.fi \
--cc=sakari.ailus@linux.intel.com \
/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