amt: fix possible memory leak in amt_rcv()
authorTaehee Yoo <ap420073@gmail.com>
Mon, 23 May 2022 16:17:08 +0000 (16:17 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 26 May 2022 04:36:16 +0000 (21:36 -0700)
commit1a1a0e80e005cbdc2c250fc858e1d8570f4e4acb
treebe36a6ae8030157e48a946e6363217a83b7406eb
parentac1dbf55981b88d64312858ea06e3e63001f085d
amt: fix possible memory leak in amt_rcv()

If an amt receives packets and it finds socket.
If it can't find a socket, it should free a received skb.
But it doesn't.
So, a memory leak would possibly occur.

Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/amt.c