OSDN Git Service

nvme-pci: fixing memory leak in probe teardown path
authorIrvin Cote <irvincoteg@gmail.com>
Wed, 8 Mar 2023 21:05:08 +0000 (18:05 -0300)
committerChristoph Hellwig <hch@lst.de>
Wed, 15 Mar 2023 13:58:51 +0000 (14:58 +0100)
commita61d265533b7fe0026a02a49916aa564ffe38e4c
treecc313de1e1dcc0d387a6b7ddc7bc35c40ea3d787
parent37f0dc2ec78af0c3f35dd05578763de059f6fe77
nvme-pci: fixing memory leak in probe teardown path

In case the nvme_probe teardown path is triggered the ctrl ref count does
not reach 0 thus creating a memory leak upon failure of nvme_probe.

Signed-off-by: Irvin Cote <irvincoteg@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c