mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:15:38 +01:00
Implemented ecp_{point,group}_free()
This commit is contained in:
parent
d7e4570ad1
commit
1e8c8ecd95
@ -36,6 +36,31 @@
|
||||
|
||||
#include "polarssl/ecp.h"
|
||||
|
||||
/*
|
||||
* Unallocate (the components of) a point
|
||||
*/
|
||||
void ecp_point_free( ecp_point *pt )
|
||||
{
|
||||
if( pt == NULL )
|
||||
return;
|
||||
|
||||
mpi_free( &( pt->X ) );
|
||||
mpi_free( &( pt->Y ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* Unallocate (the components of) a group
|
||||
*/
|
||||
void ecp_group_free( ecp_group *grp )
|
||||
{
|
||||
if( grp == NULL )
|
||||
return;
|
||||
|
||||
mpi_free( &( grp->P ) );
|
||||
mpi_free( &( grp->B ) );
|
||||
mpi_free( &( grp->N ) );
|
||||
ecp_point_free( &( grp->G ) );
|
||||
}
|
||||
|
||||
#if defined(POLARSSL_SELF_TEST)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user