mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-04-28 18:54:36 +00:00
test: fix coverity 1454040: resource leak
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14596)
This commit is contained in:
parent
743840d56f
commit
316c8dafd4
@ -42,12 +42,15 @@ static void tear_down(CMP_ASN_TEST_FIXTURE *fixture)
|
||||
|
||||
static int execute_cmp_asn1_get_int_test(CMP_ASN_TEST_FIXTURE *fixture)
|
||||
{
|
||||
int res;
|
||||
ASN1_INTEGER *asn1integer = ASN1_INTEGER_new();
|
||||
ASN1_INTEGER_set(asn1integer, 77);
|
||||
if (!TEST_int_eq(77, ossl_cmp_asn1_get_int(asn1integer)))
|
||||
|
||||
if (!TEST_ptr(asn1integer))
|
||||
return 0;
|
||||
ASN1_INTEGER_set(asn1integer, 77);
|
||||
res = TEST_int_eq(77, ossl_cmp_asn1_get_int(asn1integer));
|
||||
ASN1_INTEGER_free(asn1integer);
|
||||
return 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
static int test_cmp_asn1_get_int(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user