git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
MPILIB: Add a missing ENOMEM check
[pandora-kernel.git]
/
lib
/
mpi
/
mpicoder.c
diff --git
a/lib/mpi/mpicoder.c
b/lib/mpi/mpicoder.c
index
fe84bb9
..
716802b
100644
(file)
--- a/
lib/mpi/mpicoder.c
+++ b/
lib/mpi/mpicoder.c
@@
-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];