Commit 4bf1924c authored by David Howells's avatar David Howells Committed by James Morris
Browse files

MPILIB: Add a missing ENOMEM check

Add a missing ENOMEM check.

Signed-off-by: default avatarDavid Howells <>
Acked-by: default avatarMimi Zohar <>
Signed-off-by: default avatarJames Morris <>
parent f59e842f
......@@ -255,6 +255,8 @@ void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign)
if (!n)
n++; /* avoid zero length allocation */
p = buffer = kmalloc(n, GFP_KERNEL);
if (!p)
return NULL;
for (i = a->nlimbs - 1; i >= 0; i--) {
alimb = a->d[i];
Supports Markdown
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