mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 02:19:54 -04:00
staging: rts5208: fix memleaks on error handling paths in probe
rtsx_probe() allocates host, but does not free it on error handling paths. The patch adds missed scsi_host_put(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov <novikov@ispras.ru> Link: https://lore.kernel.org/r/20200623141230.7258-1-novikov@ispras.ru Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8ce8668bfb
commit
11507bf9a8
@@ -972,6 +972,7 @@ static int rtsx_probe(struct pci_dev *pci,
|
||||
kfree(dev->chip);
|
||||
chip_alloc_fail:
|
||||
dev_err(&pci->dev, "%s failed\n", __func__);
|
||||
scsi_host_put(host);
|
||||
scsi_host_alloc_fail:
|
||||
pci_release_regions(pci);
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user