projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
crypto: algapi - enforce that all instances have a ->free() method
[linux-2.6-block.git]
/
crypto
/
skcipher.c
diff --git
a/crypto/skcipher.c
b/crypto/skcipher.c
index 42add1e0814ffa5bec1329ea130cef9c1d6a57aa..7221def7b9a7ff4bd2b3a96d53b162cd8d10d5bf 100644
(file)
--- a/
crypto/skcipher.c
+++ b/
crypto/skcipher.c
@@
-865,6
+865,9
@@
int skcipher_register_instance(struct crypto_template *tmpl,
{
int err;
+ if (WARN_ON(!inst->free))
+ return -EINVAL;
+
err = skcipher_prepare_alg(&inst->alg);
if (err)
return err;