From 0af4b6a3b092660a7b90f3f5c0bf7942e76eec3a Mon Sep 17 00:00:00 2001 From: Horia Geanta Date: Fri, 8 May 2015 18:20:12 +0300 Subject: crypto: talitos - avoid memleak in talitos_alg_alloc() Change-Id: I0e1cbb1d09eef65fedf75d7c3787898fc5b67f50 Signed-off-by: Horia Geanta Reviewed-on: http://git.am.freescale.net:8181/36121 Tested-by: Review Code-CDREVIEW Reviewed-by: Tudor-Dan Ambarus Reviewed-by: Honghua Yin diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index ee49966..8ebe3f9 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -2960,6 +2960,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); } -- cgit v0.10.2