Re: [PATCH] pinctrl: pinconf-generic: fix properties bitmap leak in parse_fw_cfg()
From: Linus Walleij
Date: Tue Apr 28 2026 - 06:15:40 EST
On Mon, Apr 20, 2026 at 12:56 PM Felix Gu <ustc.gu@xxxxxxxxx> 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@xxxxxxxxx>
Very elegant Felix, thanks!
Patch applied.
Yours,
Linus Walleij