From: andy.shevchenko@gmail.com
To: Jonathan Cameron <jic23@kernel.org>
Cc: Dinghao Liu <dinghao.liu@zju.edu.cn>,
Lars-Peter Clausen <lars@metafoo.de>,
Alexandru Ardelean <alexandru.ardelean@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: core: fix memleak in iio_device_register_sysfs
Date: Sun, 11 Feb 2024 21:16:32 +0200 [thread overview]
Message-ID: <ZckdEDbAqin1Fsgt@surfacebook.localdomain> (raw)
In-Reply-To: <20231217132800.27e83a01@jic23-huawei>
Sun, Dec 17, 2023 at 01:28:00PM +0000, Jonathan Cameron kirjoitti:
> On Sun, 10 Dec 2023 13:32:28 +0000
> Jonathan Cameron <jic23@kernel.org> wrote:
>
> > On Fri, 8 Dec 2023 15:31:19 +0800
> > Dinghao Liu <dinghao.liu@zju.edu.cn> wrote:
> >
> > > When iio_device_register_sysfs_group() fails, we should
> > > free iio_dev_opaque->chan_attr_group.attrs to prevent
> > > potential memleak.
> > >
> > > Fixes: 32f171724e5c ("iio: core: rework iio device group creation")
> > > Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> > Hi.
> >
> > Looks good to me, but I'd like to leave this one on the list a little
> > longer to see if anyone else has comments.
> >
> Guess no comments!
This patch does not fix anything.
Yet, it might be considered as one that increases robustness, but with this applied the
goto
https://elixir.bootlin.com/linux/v6.8-rc3/source/drivers/iio/industrialio-core.c#L2007
can be amended, right?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-02-11 19:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 7:31 [PATCH] iio: core: fix memleak in iio_device_register_sysfs Dinghao Liu
2023-12-10 13:32 ` Jonathan Cameron
2023-12-17 13:28 ` Jonathan Cameron
2024-02-11 19:16 ` andy.shevchenko [this message]
2024-02-11 19:37 ` Jonathan Cameron
2024-02-11 20:19 ` Andy Shevchenko
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=ZckdEDbAqin1Fsgt@surfacebook.localdomain \
--to=andy.shevchenko@gmail.com \
--cc=alexandru.ardelean@analog.com \
--cc=dinghao.liu@zju.edu.cn \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.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