mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 00:12:52 +00:00
The function simple_for_each_link() has a few missing places that forgot unrefereing of-nodes after the use. The main do-while loop may abort when loop=0, and this leaves the node object still referenced. A similar leak is found in the error handling of NULL codec that aborts the loop as well. Last but not least, the inner for_each_child_of_node() loop may abort in the middle, and this leaks the refcount of the iterator node. This patch addresses these missing refcount issues. Signed-off-by: Takashi Iwai <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>