Re: [PATCH] i2c: mux: demux-pinctrl: fix OF node leak on kstrdup failure

Andi Shyti <[email protected]>
Newsgroups org.kernel.vger.linux-i2c,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Linkai,

On Thu, Aug 13, 2026 at 05:56:17PM +0800, Linkai Gong wrote:
> of_parse_phandle() takes a reference on the parent node. If a later
> devm_kstrdup() fails, err_rollback only releases nodes for indices
> 0..i-1, so the current node is leaked.
> 
> of_node_put() the current parent before rolling back.
> 
> Fixes: 7c0195fa9a9e ("i2c: mux: demux-pinctrl: check the return value of devm_kstrdup()")
> Signed-off-by: Linkai Gong <[email protected]>

merged to i2c/i2c-2.

Thanks,
Andi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.