diff options
author | Pauli <pauli@openssl.org> | 2021-06-25 12:57:53 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-06-26 11:33:52 +1000 |
commit | f06c5547605b1e400f95eafb77a42947e4d50b78 (patch) | |
tree | 4bc6a5a090e371dca305c5eec19b9fa23b1f07fa /test/hmactest.c | |
parent | 711d5a2fc0d611d5574c6d81b9cc0aa1564d2d2a (diff) |
test: check for NULL returns better
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/15910)
Diffstat (limited to 'test/hmactest.c')
-rw-r--r-- | test/hmactest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/hmactest.c b/test/hmactest.c index 7cb7fb635c..63954a1183 100644 --- a/test/hmactest.c +++ b/test/hmactest.c @@ -132,7 +132,8 @@ static int test_hmac_run(void) unsigned int len; int ret = 0; - ctx = HMAC_CTX_new(); + if (!TEST_ptr(ctx = HMAC_CTX_new())) + return 0; HMAC_CTX_reset(ctx); if (!TEST_ptr(ctx) |