Commit 284d4f3c authored by Horia Geant?'s avatar Horia Geant? Committed by Jiri Slaby

crypto: talitos - avoid memleak in talitos_alg_alloc()

commit 5fa7dadc upstream.

Fixes: 1d11911a ("crypto: talitos - fix warning: 'alg' may be used uninitialized in this function")
Signed-off-by: default avatarHoria Geanta <horia.geanta@freescale.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent a41f0610
...@@ -2563,6 +2563,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, ...@@ -2563,6 +2563,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
break; break;
default: default:
dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type); dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type);
kfree(t_alg);
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }
......
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