From: Pauli Date: Wed, 25 Jan 2023 01:06:23 +0000 (+1100) Subject: coverity 1520506: error handling X-Git-Tag: openssl-3.2.0-alpha1~1364 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4347a9a57dcb985283bba03dd3b16294b55945b;p=thirdparty%2Fopenssl.git coverity 1520506: error handling Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/20132) --- diff --git a/test/cmp_asn_test.c b/test/cmp_asn_test.c index 7175362934a..838bf194748 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;