mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-07 13:22:46 +00:00
Free P and N of the group cause they are dynamic allocated
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
This commit is contained in:
parent
02a3e0318f
commit
b903f4ecb6
@ -591,9 +591,11 @@ void mbedtls_ecp_group_free(mbedtls_ecp_group *grp)
|
||||
}
|
||||
|
||||
if (grp->h != 1) {
|
||||
mbedtls_mpi_free(&grp->P);
|
||||
mbedtls_mpi_free(&grp->A);
|
||||
mbedtls_mpi_free(&grp->B);
|
||||
mbedtls_ecp_point_free(&grp->G);
|
||||
mbedtls_mpi_free(&grp->N);
|
||||
}
|
||||
|
||||
if (!ecp_group_is_static_comb_table(grp) && grp->T != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user