]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: hv: Add missing kfree(hbus) in hv_pci_probe()'s error handling path
authorDexuan Cui <decui@microsoft.com>
Sat, 22 Feb 2020 05:59:57 +0000 (21:59 -0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 24 Feb 2020 11:59:25 +0000 (11:59 +0000)
commit1580f7b0298c24c0af1e0fcef365ea5886a30bf1
tree16890813b3f796335684d14b6af5e7db497944af
parent2b8670c4668871ea4c91f4adb28afa4d67916e6e
PCI: hv: Add missing kfree(hbus) in hv_pci_probe()'s error handling path

Now that we use kzalloc() to allocate the hbus buffer, we must call
kfree() in the error path as well to prevent memory leakage.

Fixes: cb03d9359049 ("PCI: hv: Avoid a kmemleak false positive caused by the hbus buffer")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
drivers/pci/controller/pci-hyperv.c