mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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: 9d71dd0c70 ("can: add support of SAE J1939 protocol")
Signed-off-by: Oleksij Rempel <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
This commit is contained in:
parent
db1a804cca
commit
896daf723c
1 changed files with 1 additions and 0 deletions
|
|
@ -580,6 +580,7 @@ static int j1939_sk_release(struct socket *sock)
|
|||
j1939_netdev_stop(priv);
|
||||
}
|
||||
|
||||
kfree(jsk->filters);
|
||||
sock_orphan(sk);
|
||||
sock->sk = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue