projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62aa2b5
)
lib/mpi: added missing NULL check
author
Dmitry Kasatkin
<dmitry.kasatkin@intel.com>
Thu, 26 Jan 2012 17:13:17 +0000
(19:13 +0200)
committer
James Morris
<jmorris@namei.org>
Wed, 1 Feb 2012 13:23:13 +0000
(
00:23
+1100)
Added missing NULL check after mpi_alloc().
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Reviewed-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
lib/mpi/mpicoder.c
patch
|
blob
|
history
diff --git
a/lib/mpi/mpicoder.c
b/lib/mpi/mpicoder.c
index
716802b
..
6116fc4
100644
(file)
--- a/
lib/mpi/mpicoder.c
+++ b/
lib/mpi/mpicoder.c
@@
-79,7
+79,8
@@
MPI do_encode_md(const void *sha_buffer, unsigned nbits)
}
a = mpi_alloc((nframe + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB);
- mpi_set_buffer(a, frame, nframe, 0);
+ if (a)
+ mpi_set_buffer(a, frame, nframe, 0);
kfree(frame);
return a;