mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
lib/mpi: added missing NULL check
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>
This commit is contained in:
parent
62aa2b537c
commit
c70c471c58
@ -79,6 +79,7 @@ MPI do_encode_md(const void *sha_buffer, unsigned nbits)
|
||||
}
|
||||
|
||||
a = mpi_alloc((nframe + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB);
|
||||
if (a)
|
||||
mpi_set_buffer(a, frame, nframe, 0);
|
||||
kfree(frame);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user