pkarse: Update pk_group_id_from_specified()
clean-up.
This path updates the clean-up logic of to individually free each of the the group's structure members rather than invoke `mbedtls_ecp_group_free()`. Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
e9fa7a74cd
commit
c8e381ab1c
1 changed files with 5 additions and 1 deletions
|
@ -429,7 +429,11 @@ static int pk_group_id_from_specified(const mbedtls_asn1_buf *params,
|
||||||
ret = pk_group_id_from_group(&grp, grp_id);
|
ret = pk_group_id_from_group(&grp, grp_id);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
mbedtls_ecp_group_free(&grp);
|
mbedtls_mpi_free(&grp.N);
|
||||||
|
mbedtls_mpi_free(&grp.P);
|
||||||
|
mbedtls_mpi_free(&grp.A);
|
||||||
|
mbedtls_mpi_free(&grp.B);
|
||||||
|
mbedtls_ecp_point_free(&grp.G);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue