summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2023-01-25 12:06:23 +1100
committerPauli <pauli@openssl.org>2023-01-30 08:35:36 +1100
commitda6d4180526e5f6a03ecaae46a2bf9841eea44c6 (patch)
treec9d52a031cf1842dbbd17003e62ec0742a423f38 /test
parent2680cd25ed05569d7dd9c2fdc976a5d0fde36e66 (diff)
coverity 1520506: 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 a4347a9a57dcb985283bba03dd3b16294b55945b)
Diffstat (limited to 'test')
-rw-r--r--test/cmp_asn_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/cmp_asn_test.c b/test/cmp_asn_test.c
index 36ae8a6008..f62de7cc4a 100644
--- a/test/cmp_asn_test.c
+++ b/test/cmp_asn_test.c
@@ -47,7 +47,10 @@ static int execute_cmp_asn1_get_int_test(CMP_ASN_TEST_FIXTURE *fixture)
if (!TEST_ptr(asn1integer))
return 0;
- ASN1_INTEGER_set(asn1integer, 77);
+ if (!TEST_true(ASN1_INTEGER_set(asn1integer, 77))) {
+ ASN1_INTEGER_free(asn1integer);
+ return 0;
+ }
res = TEST_int_eq(77, ossl_cmp_asn1_get_int(asn1integer));
ASN1_INTEGER_free(asn1integer);
return res;