Skip to content
Commit d7f76f36 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Jens Axboe
Browse files

ata: libahci_platform: Add of_node_put() before loop exit



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. Add an of_node_put before three such goto
statements.
Issue found with Coccinelle.

Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8454d685
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment