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 07:47:25 +0000 (09:47 +0200)
commit467ddbbe7e749d558f13e640f50f546149c930b3
treee73097e10e47e99caa9c5ee764c3d01008afb820
parent2cbce0110070d0a9a5e437ae4a82b0deb80c0cfb
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