From 00407fbf0b25d65f5e6d99defdb081432e810449 Mon Sep 17 00:00:00 2001 From: Pauli Date: Wed, 25 Jan 2023 12:06:09 +1100 Subject: [PATCH] coverity 1520505: error handling Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/20132) --- test/cmp_hdr_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cmp_hdr_test.c b/test/cmp_hdr_test.c index 9e041db1a08..c4cab22f5f7 100644 --- a/test/cmp_hdr_test.c +++ b/test/cmp_hdr_test.c @@ -333,12 +333,12 @@ execute_HDR_generalInfo_push1_items_test(CMP_HDR_TEST_FIXTURE *fixture) if (!TEST_ptr(asn1int)) return 0; - if (!TEST_ptr(val)) { + if (!TEST_ptr(val) + || !TEST_true(ASN1_INTEGER_set(asn1int, 88))) { ASN1_INTEGER_free(asn1int); return 0; } - ASN1_INTEGER_set(asn1int, 88); ASN1_TYPE_set(val, V_ASN1_INTEGER, asn1int); if (!TEST_ptr(itav = OSSL_CMP_ITAV_create(OBJ_txt2obj(oid, 1), val))) { ASN1_TYPE_free(val); -- 2.47.2