mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Walleij <linusw@kernel.org>
To: Felix Gu <ustc.gu@gmail.com>
Cc: Conor Dooley <conor.dooley@microchip.com>,
	linux-gpio@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: pinconf-generic: fix properties bitmap leak in parse_fw_cfg()
Date: Tue, 28 Apr 2026 11:42:44 +0200	[thread overview]
Message-ID: <CAD++jLkfGi2rVF4FVPOgVSphGPHNFiLBLDiK6Bkoroy4KZf8Zw@mail.gmail.com> (raw)
In-Reply-To: <20260420-pinconf-v1-1-82f8276d8aec@gmail.com>

On Mon, Apr 20, 2026 at 12:56 PM Felix Gu <ustc.gu@gmail.com> wrote:

> In parse_fw_cfg(), if fwnode_property_match_property_string() fails with
> -ENOENT, the code returns directly and leaks the bitmap.
>
> Use __free(bitmap) for automatic cleanup to fix the leak.
>
> Fixes: 9c105255108b ("pinctrl: pinconf-generic: perform basic checks on pincfg properties")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>

Very elegant Felix, thanks!
Patch applied.

Yours,
Linus Walleij

      reply	other threads:[~2026-04-28  9:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 10:55 Felix Gu
2026-04-28  9:42 ` Linus Walleij [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=CAD++jLkfGi2rVF4FVPOgVSphGPHNFiLBLDiK6Bkoroy4KZf8Zw@mail.gmail.com \
    --to=linusw@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ustc.gu@gmail.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

all inboxes | Powered by JetHome®