Commit 42c3d418 authored by Dexuan Cui's avatar Dexuan Cui Committed by Lorenzo Pieralisi
Browse files

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: 877b911a ("PCI: hv: Avoid a kmemleak false positive caused by the hbus buffer")
Signed-off-by: default avatarDexuan Cui <decui@microsoft.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
parent e658a4fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3058,7 +3058,7 @@ destroy_wq:
free_dom:
	hv_put_dom_num(hbus->sysdata.domain);
free_bus:
	free_page((unsigned long)hbus);
	kfree(hbus);
	return ret;
}