crypto: talitos - avoid memleak in talitos_alg_alloc()
Cc: <stable@vger.kernel.org> # 3.2+
Fixes: 1d11911a8c
("crypto: talitos - fix warning: 'alg' may be used uninitialized in this function")
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
f7ead7b47a
commit
5fa7dadc89
1 changed files with 1 additions and 0 deletions
|
@ -2813,6 +2813,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue