summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorYuan Can <yuancan@huawei.com>2022-11-22 01:57:51 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-12-31 13:32:34 +0100
commit0aa7be66168b1e84b2581ffff3ccb54a6c804a1e (patch)
treeb185951b9e57cf84ab07aabe4a3cc51b925ab458 /crypto
parent21d8b6bd3730fc6af7ff0eb3c65a8364da310f66 (diff)
downloadlinux-0aa7be66168b1e84b2581ffff3ccb54a6c804a1e.tar.gz
linux-0aa7be66168b1e84b2581ffff3ccb54a6c804a1e.tar.bz2
linux-0aa7be66168b1e84b2581ffff3ccb54a6c804a1e.zip
scsi: hpsa: Fix possible memory leak in hpsa_init_one()
[ Upstream commit 9c9ff300e0de07475796495d86f449340d454a0c ] The hpda_alloc_ctlr_info() allocates h and its field reply_map. However, in hpsa_init_one(), if alloc_percpu() failed, the hpsa_init_one() jumps to clean1 directly, which frees h and leaks the h->reply_map. Fix by calling hpda_free_ctlr_info() to release h->replay_map and h instead free h directly. Fixes: 8b834bff1b73 ("scsi: hpsa: fix selection of reply queue") Signed-off-by: Yuan Can <yuancan@huawei.com> Link: https://lore.kernel.org/r/20221122015751.87284-1-yuancan@huawei.com Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions