diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-21 12:00:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-21 12:00:25 -0400 |
commit | 5f663404b27fa72546a592c5c932b0605b9c93a6 (patch) | |
tree | c27e3df5e02232410bf43af6f43d26eec5f53e35 | |
parent | 55b637c6a003a8c4850b41a2c2fd6942d8a7f530 (diff) | |
parent | da7cd59ab9c8ed233df4809f6c8c90c636f676c7 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] api: Read module pointer before freeing algorithm
-rw-r--r-- | crypto/api.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/api.c b/crypto/api.c index 55af8bb0f050..33734fd9198f 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -48,8 +48,10 @@ EXPORT_SYMBOL_GPL(crypto_mod_get); | |||
48 | 48 | ||
49 | void crypto_mod_put(struct crypto_alg *alg) | 49 | void crypto_mod_put(struct crypto_alg *alg) |
50 | { | 50 | { |
51 | struct module *module = alg->cra_module; | ||
52 | |||
51 | crypto_alg_put(alg); | 53 | crypto_alg_put(alg); |
52 | module_put(alg->cra_module); | 54 | module_put(module); |
53 | } | 55 | } |
54 | EXPORT_SYMBOL_GPL(crypto_mod_put); | 56 | EXPORT_SYMBOL_GPL(crypto_mod_put); |
55 | 57 | ||