summaryrefslogtreecommitdiffstats
path: root/test/hmactest.c
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2021-06-25 12:57:53 +1000
committerPauli <pauli@openssl.org>2021-06-26 11:33:52 +1000
commitf06c5547605b1e400f95eafb77a42947e4d50b78 (patch)
tree4bc6a5a090e371dca305c5eec19b9fa23b1f07fa /test/hmactest.c
parent711d5a2fc0d611d5574c6d81b9cc0aa1564d2d2a (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.c3
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)