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)
This commit is contained in:
Pauli 2023-01-25 12:06:23 +11:00
parent 00407fbf0b
commit a4347a9a57

View File

@ -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;