Commit 2716fbf6 authored by Jiri Slaby's avatar Jiri Slaby Committed by Herbert Xu

crypto: skcipher - avoid NULL dereference

Stanse found a potential NULL dereference in ablkcipher_next_slow.
Even though kmalloc fails, its retval is dereferenced later. Return
from that function properly earlier.
Signed-off-by: default avatarJiri Slaby <>
Acked-by: default avatarDavid S. Miller <>
Signed-off-by: default avatarHerbert Xu <>
parent 0f0a8fa7
......@@ -165,7 +165,7 @@ static inline int ablkcipher_next_slow(struct ablkcipher_request *req,
p = kmalloc(n, GFP_ATOMIC);
if (!p)
ablkcipher_walk_done(req, walk, -ENOMEM);
return ablkcipher_walk_done(req, walk, -ENOMEM);
base = p + 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment