can: j1939: fix memory leak if filters was set
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 10 Oct 2019 10:50:31 +0000 (12:50 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 4 Nov 2019 20:47:23 +0000 (21:47 +0100)
commit896daf723c845289a4ea1e68e74a5a5475aa796d
treeabb29f62b0bbdb71c3c2b215df30314913f849ea
parentdb1a804cca6fe0cea9dea888d50dda134713c340
can: j1939: fix memory leak if filters was set

Filters array is coped from user space and linked to the j1939 socket.
On socket release this memory was not freed.

Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/j1939/socket.c