Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148788
b: refs/heads/master
c: 811d8f0
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Weiner authored and Herbert Xu committed Jun 2, 2009
1 parent 161cc8b commit b664575
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 376bacb0a26bca722981d1610ffb76f951572bb1
refs/heads/master: 811d8f062668077e268a7292202bb923fe2ae896
5 changes: 1 addition & 4 deletions trunk/crypto/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,20 +580,17 @@ EXPORT_SYMBOL_GPL(crypto_alloc_tfm);
void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm)
{
struct crypto_alg *alg;
int size;

if (unlikely(!mem))
return;

alg = tfm->__crt_alg;
size = ksize(mem);

if (!tfm->exit && alg->cra_exit)
alg->cra_exit(tfm);
crypto_exit_ops(tfm);
crypto_mod_put(alg);
memset(mem, 0, size);
kfree(mem);
kzfree(mem);
}
EXPORT_SYMBOL_GPL(crypto_destroy_tfm);

Expand Down

0 comments on commit b664575

Please sign in to comment.