Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1964e333 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by Herbert Xu
Browse files

crypto: hifn_795x - Fix a memory leak in the error handling path of 'hifn_probe()'



'dev' is leaking in the error handling path of 'hifn_probe()'.

Add a 'kfree(dev)' to match the code in 'hifn_remove()'

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 79e53b2a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2579,6 +2579,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
	for (i = 0; i < 3; ++i)
		if (dev->bar[i])
			iounmap(dev->bar[i]);
	kfree(dev);

err_out_free_regions:
	pci_release_regions(pdev);