diff options
Diffstat (limited to 'lib/mpi/mpicoder.c')
-rw-r--r-- | lib/mpi/mpicoder.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c index fe84bb978e3b..716802b774ea 100644 --- a/lib/mpi/mpicoder.c +++ b/lib/mpi/mpicoder.c | |||
@@ -255,6 +255,8 @@ void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign) | |||
255 | if (!n) | 255 | if (!n) |
256 | n++; /* avoid zero length allocation */ | 256 | n++; /* avoid zero length allocation */ |
257 | p = buffer = kmalloc(n, GFP_KERNEL); | 257 | p = buffer = kmalloc(n, GFP_KERNEL); |
258 | if (!p) | ||
259 | return NULL; | ||
258 | 260 | ||
259 | for (i = a->nlimbs - 1; i >= 0; i--) { | 261 | for (i = a->nlimbs - 1; i >= 0; i--) { |
260 | alimb = a->d[i]; | 262 | alimb = a->d[i]; |