]> git.itanic.dy.fi Git - linux-stable/commit
scsi: megaraid_sas: Fix double kfree()
authorGuixin Liu <kanie@linux.alibaba.com>
Tue, 2 Aug 2022 07:18:49 +0000 (15:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 09:32:02 +0000 (11:32 +0200)
commita175aed83eb4bfcc9697e29c8c14c5379886e955
treed2b3f5185a88cb42782c43cec97978cc8c05debe
parent004e26ef056c5df46f42d15610473c6dc08920e2
scsi: megaraid_sas: Fix double kfree()

[ Upstream commit 8c499e49240bd93628368c3588975cfb94169b8b ]

When allocating log_to_span fails, kfree(instance->ctrl_context) is called
twice. Remove redundant call.

Link: https://lore.kernel.org/r/1659424729-46502-1-git-send-email-kanie@linux.alibaba.com
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/megaraid/megaraid_sas_fusion.c