]> git.baikalelectronics.ru Git - kernel.git/commit
s390/ctcm: fix potential memory leak
authorAlexandra Winter <wintera@linux.ibm.com>
Tue, 10 May 2022 07:05:07 +0000 (09:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 May 2022 08:26:50 +0000 (10:26 +0200)
commitbbf59a9ac3aa8ec2c5edcc4fa76f429b8cf0bc13
treeb41cf0c65a17a82d3434117ae7d123f487130a8f
parentde77c3c406917f2b5d3057e41ff2727f14da4b74
s390/ctcm: fix potential memory leak

[ Upstream commit 934bb69e9d02f550cbee52b6b0ab37cb993c33f1 ]

smatch complains about
drivers/s390/net/ctcm_mpc.c:1210 ctcmpc_unpack_skb() warn: possible memory leak of 'mpcginfo'

mpc_action_discontact() did not free mpcginfo. Consolidate the freeing in
ctcmpc_unpack_skb().

Fixes: cb277cb3733b ("ctcm: infrastructure for replaced ctc driver")
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/s390/net/ctcm_mpc.c