]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()
authorWen Yang <wen.yang99@zte.com.cn>
Wed, 10 Jul 2019 07:25:09 +0000 (15:25 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 10 Jul 2019 15:33:57 +0000 (16:33 +0100)
commitad2384840c4726ef8ada05671ea6dec50a32ceb0
tree9b14795fdc6b5dbca84e92b252d186e6c21902d9
parentabc6d58477fa5027ba6ba91f26746b4f83e96649
ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()

After calling of_node_put() on the node variable, it is still being
used, which may result in use-after-free.
Fix this issue by calling of_node_put() after the last usage.

Fixes: 2866e309b1e5 ("ASoC: simple-card-utils: check "reg" property on asoc_simple_card_get_dai_id()")
Link: https://lore.kernel.org/r/1562743509-30496-5-git-send-email-wen.yang99@zte.com.cn
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/audio-graph-card.c