OSDN Git Service

s390/ctcm: fix potential memory leak
authorAlexandra Winter <wintera@linux.ibm.com>
Tue, 10 May 2022 07:05:07 +0000 (09:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 May 2022 11:31:01 +0000 (12:31 +0100)
commit0c0b20587b9f25a2ad14db7f80ebe49bdf29920a
treed3adefa41acdd905aa1663c737ae0ff9d8ad5f90
parent2c50c6867c85afee6f2b3bcbc50fc9d0083d1343
s390/ctcm: fix potential memory leak

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>
drivers/s390/net/ctcm_mpc.c