aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/hifn_795x.c
diff options
context:
space:
mode:
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>2017-11-18 14:45:45 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2017-11-29 17:33:30 +1100
commit1964e333baf4e91b05defdf2572ea6d0845ffbd7 (patch)
tree5acefe0dd598b9a8b2f19841fa7b2cdf186753cb /drivers/crypto/hifn_795x.c
parentcrypto: remove unused hardirq.h (diff)
downloadlinux-dev-1964e333baf4e91b05defdf2572ea6d0845ffbd7.tar.xz
linux-dev-1964e333baf4e91b05defdf2572ea6d0845ffbd7.zip
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hifn_795x.c')
-rw-r--r--drivers/crypto/hifn_795x.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index e09d4055b19e..a5a36fe7bf2c 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -2579,6 +2579,7 @@ err_out_unmap_bars:
for (i = 0; i < 3; ++i)
if (dev->bar[i])
iounmap(dev->bar[i]);
+ kfree(dev);
err_out_free_regions:
pci_release_regions(pdev);