In the Linux kernel, the following vulnerability has been resolved: PCI: Fix reference leak in pciregisterhostbridge() If deviceregister() fails, call putdevice() to give up the reference to avoid a memory leak, per the comment at deviceregister(). Found by code review. [bhelgaas: squash Dan Carpenter's double free fix from https://lore.kernel.org/r/db806a6c-a91b-4e5a-a84b-6b7e01bdac85@stanley.mountain]