diff options
author | Pauli <pauli@openssl.org> | 2023-01-25 12:06:23 +1100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-01-30 08:34:16 +1100 |
commit | a4347a9a57dcb985283bba03dd3b16294b55945b (patch) | |
tree | 233a8e76c877c8db6ddcdbb9bf04c7467b20393b /test/cmp_asn_test.c | |
parent | 00407fbf0b25d65f5e6d99defdb081432e810449 (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)
Diffstat (limited to 'test/cmp_asn_test.c')
-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 7175362934..838bf19474 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; |