]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gtp: add missing gtp_encap_disable_sock() in gtp_encap_enable()
authorTaehee Yoo <ap420073@gmail.com>
Tue, 2 Jul 2019 15:24:04 +0000 (00:24 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:50 +0000 (09:12 +0200)
commit83e8d4c87dd3c215f501cce43a39c35f4fc4f9f5
tree542cec3c8cccd6e8b54b6ec0a03efa8ffea5304f
parent11f91596e0c385ae61ff2d1e2707e0d1a48c9d37
gtp: add missing gtp_encap_disable_sock() in gtp_encap_enable()

[ Upstream commit e30155fd23c9c141cbe7d99b786e10a83a328837 ]

If an invalid role is sent from user space, gtp_encap_enable() will fail.
Then, it should call gtp_encap_disable_sock() but current code doesn't.
It makes memory leak.

Fixes: 91ed81f9abc7 ("gtp: support SGSN-side tunnels")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/gtp.c