Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c70c471c authored by Dmitry Kasatkin's avatar Dmitry Kasatkin Committed by James Morris
Browse files

lib/mpi: added missing NULL check



Added missing NULL check after mpi_alloc().

Signed-off-by: default avatarDmitry Kasatkin <dmitry.kasatkin@intel.com>
Reviewed-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 62aa2b53
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);