From: Horia Geant? Date: Mon, 11 May 2015 17:03:24 +0000 (+0300) Subject: crypto: talitos - avoid memleak in talitos_alg_alloc() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=54b915793f085622ffa78e3cffd94a5733cc71b9;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git crypto: talitos - avoid memleak in talitos_alg_alloc() commit 5fa7dadc898567ce14d6d6d427e7bd8ce6eb5d39 upstream. Fixes: 1d11911a8c57 ("crypto: talitos - fix warning: 'alg' may be used uninitialized in this function") Signed-off-by: Horia Geanta Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 5b2b5e61e4f9..9723b3dcebe7 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -2621,6 +2621,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, break; default: dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type); + kfree(t_alg); return ERR_PTR(-EINVAL); }