Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bfa49cfc authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

net/ethoc: fix null dereference on error exit path



priv is assigned to NULL however some of the early error exit paths to
label 'free' dereference priv, causing a null pointer dereference.

Move the label 'free' to just the free_netdev statement, and add a new
exit path 'free2' for the error cases were clk_disable_unprepare needs
calling before the final free.

Fixes issue found by CoverityScan, CID#113260

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fc14963f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment