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:15:43 +0000 (09:15 +0200)
commit36933de59f67029e5739a98393891f9b94f27e0f
tree317bf1b55c86384efd7430e81e7026ad155f41b1
parent958e33ecddc3c76506f6d29f863b60257cf70968
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