diff options
author | Pauli <pauli@openssl.org> | 2023-01-25 12:06:23 +1100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-01-30 08:35:03 +1100 |
commit | 00e8275a8e4d6908310aa0cebbaa450782bfbb70 (patch) | |
tree | 4b0498b00ca85d5ae873ebd99da6819194f5a396 | |
parent | 4476dcaf9fdb8d2a24ea4361735752e27adc6252 (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)
-rw-r--r-- | test/cmp_asn_test.c | 5 |
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; |