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
lib/mpi: Add the return value check of kcalloc()
[linux-2.6-block.git]
/
lib
/
mpi
/
mpi-mod.c
diff --git
a/lib/mpi/mpi-mod.c
b/lib/mpi/mpi-mod.c
index 47bc59edd4ff939f961389bda33ede24917f53ec..54fcc01564d9dc6f1a1ae5b58ad820e503f64fbe 100644
(file)
--- a/
lib/mpi/mpi-mod.c
+++ b/
lib/mpi/mpi-mod.c
@@
-40,6
+40,8
@@
mpi_barrett_t mpi_barrett_init(MPI m, int copy)
mpi_normalize(m);
ctx = kcalloc(1, sizeof(*ctx), GFP_KERNEL);
+ if (!ctx)
+ return NULL;
if (copy) {
ctx->m = mpi_copy(m);