[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <176971394344.256159.5142804306791843218.b4-ty@bootlin.com>
Date: Thu, 29 Jan 2026 20:12:23 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: richard@....at, vigneshr@...com, Weigang He <geoffreyhe2@...il.com>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: parsers: ofpart: fix OF node refcount leak in
parse_fixed_partitions()
On Fri, 23 Jan 2026 05:26:08 +0000, Weigang He wrote:
> of_get_child_by_name() returns a node pointer with refcount incremented,
> which must be released with of_node_put() when done. However, in
> parse_fixed_partitions(), when dedicated is true (i.e., a "partitions"
> subnode was found), the ofpart_node obtained from of_get_child_by_name()
> is never released on any code path.
>
> Add of_node_put(ofpart_node) calls on all exit paths when dedicated is
> true to fix the reference count leak.
>
> [...]
Applied to mtd/next, thanks!
[1/1] mtd: parsers: ofpart: fix OF node refcount leak in parse_fixed_partitions()
commit: 7cce81df7d26d44123bd7620715c8349d96793d7
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl
Powered by blists - more mailing lists