diff options
author | Nishka Dasgupta <nishkadg.linux@gmail.com> | 2019-07-16 07:38:31 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-27 07:53:26 +0100 |
commit | bf9d46f751e75bf3d9a48bd69675f95d86ff7eb9 (patch) | |
tree | fcd86383f18cb487694d87adb7e53b244cd8b279 /drivers/macintosh/adb.c | |
parent | d0ac1a26ed5943127cb0156148735f5f52a07075 (diff) |
media: platform: sti: c8sectpfe: core: Add of_node_put() at goto
Each iteration of for_each_child_of_node puts the previous node, but in
the case of a goto from the middle of the loop, there is no put, thus
causing a memory leak. Hence add a new label that puts the last used
node, and edit the goto statements in the middle of the loop to first go
to the new label.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/macintosh/adb.c')
0 files changed, 0 insertions, 0 deletions