mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 04:34:41 +02:00
Add memory free to prevent from leaking
This commit is contained in:
@@ -18560,7 +18560,11 @@ static void test_wolfSSL_OBJ(void)
|
|||||||
AssertNotNull(asn1Name = X509_NAME_ENTRY_get_object(x509NameEntry));
|
AssertNotNull(asn1Name = X509_NAME_ENTRY_get_object(x509NameEntry));
|
||||||
AssertTrue((nid = OBJ_obj2nid(asn1Name)) > 0);
|
AssertTrue((nid = OBJ_obj2nid(asn1Name)) > 0);
|
||||||
printf("nid=%d\n", nid);
|
printf("nid=%d\n", nid);
|
||||||
|
ASN1_OBJECT_free(asn1Name);
|
||||||
}
|
}
|
||||||
|
BIO_free(bio);
|
||||||
|
X509_free(x509);
|
||||||
|
XFCLOSE(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; p12_f[i] != NULL; i++)
|
for (i = 0; p12_f[i] != NULL; i++)
|
||||||
@@ -18578,7 +18582,11 @@ static void test_wolfSSL_OBJ(void)
|
|||||||
AssertNotNull(asn1Name = X509_NAME_ENTRY_get_object(x509NameEntry));
|
AssertNotNull(asn1Name = X509_NAME_ENTRY_get_object(x509NameEntry));
|
||||||
AssertTrue((nid = OBJ_obj2nid(asn1Name)) > 0);
|
AssertTrue((nid = OBJ_obj2nid(asn1Name)) > 0);
|
||||||
printf("nid=%d\n", nid);
|
printf("nid=%d\n", nid);
|
||||||
|
ASN1_OBJECT_free(asn1Name);
|
||||||
}
|
}
|
||||||
|
BIO_free(bio);
|
||||||
|
X509_free(x509);
|
||||||
|
XFCLOSE(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf(resultFmt, passed);
|
printf(resultFmt, passed);
|
||||||
|
Reference in New Issue
Block a user