summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2023-01-25 12:06:09 +1100
committerPauli <pauli@openssl.org>2023-01-30 08:35:01 +1100
commit4476dcaf9fdb8d2a24ea4361735752e27adc6252 (patch)
tree61250421516b745d698347aa5ff99433cdd3b6c4
parentc6a7b7bebafea37fc8d9bcb2768e7da14b5e9462 (diff)
coverity 1520505: error handling
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/20132) (cherry picked from commit 00407fbf0b25d65f5e6d99defdb081432e810449)
-rw-r--r--test/cmp_hdr_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cmp_hdr_test.c b/test/cmp_hdr_test.c
index 5a49299b42..c7162a3712 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);