]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme-core: fix a memory leak in nvme_ns_info_from_identify()
authorMaurizio Lombardi <mlombard@redhat.com>
Thu, 23 Nov 2023 14:07:41 +0000 (15:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:50:04 +0000 (11:50 +0100)
commit3c781fbb4f4205db7a4f3fa08e827638baa94af8
tree3ae91dbfab4de990216e56701394474636baddd1
parenta37096b079b71ef6b08e01328e541cb543883c05
nvme-core: fix a memory leak in nvme_ns_info_from_identify()

[ Upstream commit e3139cef8257fcab1725441e2fd5fd0ccb5481b1 ]

In case of error, free the nvme_id_ns structure that was allocated
by nvme_identify_ns().

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c