mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 16:25:43 +01:00
Added generic asn1_free_named_data_list()
This commit is contained in:
parent
59ba59fa30
commit
c547cc992e
@ -319,6 +319,14 @@ asn1_named_data *asn1_find_named_data( asn1_named_data *list,
|
|||||||
*/
|
*/
|
||||||
void asn1_free_named_data( asn1_named_data *entry );
|
void asn1_free_named_data( asn1_named_data *entry );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free all entries in a asn1_named_data list
|
||||||
|
* Head will be set to NULL
|
||||||
|
*
|
||||||
|
* \param head Pointer to the head of the list of named data entries to free
|
||||||
|
*/
|
||||||
|
void asn1_free_named_data_list( asn1_named_data **head );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -354,6 +354,18 @@ void asn1_free_named_data( asn1_named_data *cur )
|
|||||||
memset( cur, 0, sizeof( asn1_named_data ) );
|
memset( cur, 0, sizeof( asn1_named_data ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void asn1_free_named_data_list( asn1_named_data **head )
|
||||||
|
{
|
||||||
|
asn1_named_data *cur;
|
||||||
|
|
||||||
|
while( ( cur = *head ) != NULL )
|
||||||
|
{
|
||||||
|
*head = cur->next;
|
||||||
|
asn1_free_named_data( cur );
|
||||||
|
polarssl_free( cur );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
asn1_named_data *asn1_find_named_data( asn1_named_data *list,
|
asn1_named_data *asn1_find_named_data( asn1_named_data *list,
|
||||||
const char *oid, size_t len )
|
const char *oid, size_t len )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user