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

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
...@@ -2579,6 +2579,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -2579,6 +2579,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
for (i = 0; i < 3; ++i) for (i = 0; i < 3; ++i)
if (dev->bar[i]) if (dev->bar[i])
iounmap(dev->bar[i]); iounmap(dev->bar[i]);
kfree(dev);
err_out_free_regions: err_out_free_regions:
pci_release_regions(pdev); pci_release_regions(pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment