evp_test: Add the missing check after calling OPENSSL_malloc
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Mon, 24 Jan 2022 03:06:34 +0000 (11:06 +0800)
committerTomas Mraz <tomas@openssl.org>
Tue, 25 Jan 2022 17:16:07 +0000 (18:16 +0100)
commit7ae540d59a01f2765b7868c0887be9bc3c0596c6
treeda24c944b4b9cd9493d7a569bfed432ac05b74f3
parente293979b2c23712769bf9c655e8a440bf2d3d44f
evp_test: Add the missing check after calling OPENSSL_malloc

The OPENSSL_zalloc() could return NULL pointer if fails.
Add the check for it does make sense, like how digest_test_init() deals
with.

CLA: trivial

Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17571)

(cherry picked from commit 2208ba56ebefe4cf7d924e2ac7044ccd3307250b)
test/evp_test.c