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)
commit2bd57101c3ecf3f8c0da1d26c2b6ad511adc6d50
treeb41cf0c65a17a82d3434117ae7d123f487130a8f
parent21bb0246af424773fac9e5167c9ff3f48f16546a
s390/ctcm: fix potential memory leak

[ Upstream commit 0c0b20587b9f25a2ad14db7f80ebe49bdf29920a ]

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: 293d984f0e36 ("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