Commit da02a182 authored by Aleksei Nikiforov's avatar Aleksei Nikiforov Committed by Jakub Kicinski
Browse files

s390/ctcm: Fix double-kfree



The function 'mpc_rcvd_sweep_req(mpcginfo)' is called conditionally
from function 'ctcmpc_unpack_skb'. It frees passed mpcginfo.
After that a call to function 'kfree' in function 'ctcmpc_unpack_skb'
frees it again.

Remove 'kfree' call in function 'mpc_rcvd_sweep_req(mpcginfo)'.

Bug detected by the clang static analyzer.

Fixes: 0c0b2058 ("s390/ctcm: fix potential memory leak")
Reviewed-by: default avatarAswin Karuvally <aswin@linux.ibm.com>
Signed-off-by: default avatarAleksei Nikiforov <aleksei.nikiforov@linux.ibm.com>
Signed-off-by: default avatarAswin Karuvally <aswin@linux.ibm.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20251112182724.1109474-1-aswin@linux.ibm.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5442a9da
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -701,7 +701,6 @@ static void mpc_rcvd_sweep_req(struct mpcg_info *mpcginfo)

	grp->sweep_req_pend_num--;
	ctcmpc_send_sweep_resp(ch);
	kfree(mpcginfo);
	return;
}