summaryrefslogtreecommitdiff
path: root/test/params_test.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/params_test.c
parent711d5a2fc0d611d5574c6d81b9cc0aa1564d2d2a (diff)
downloadopenssl-new-f06c5547605b1e400f95eafb77a42947e4d50b78.tar.gz
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/params_test.c')
-rw-r--r--test/params_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/params_test.c b/test/params_test.c
index 205c2deab0..13cfb9d19e 100644
--- a/test/params_test.c
+++ b/test/params_test.c
@@ -97,7 +97,10 @@ static void cleanup_object(void *vobj)
static void *init_object(void)
{
- struct object_st *obj = OPENSSL_zalloc(sizeof(*obj));
+ struct object_st *obj;
+
+ if (!TEST_ptr(obj = OPENSSL_zalloc(sizeof(*obj))))
+ return NULL;
obj->p1 = p1_init;
obj->p2 = p2_init;