These functions were taking it upon themselves to free the we_Ecc object and
the data it holds. With this commit, that's left to we_ec_cleanup. A user
discovered this problem, and I reproduced it by changing this line
to trigger a deliberate failure in we_ec_p192_init. If you do that and run the
unit tests, you'll get a double free fault. This commit fixes this problem
across the we_ec_p*_init functions.
These functions were taking it upon themselves to free the
we_Ecc
object and the data it holds. With this commit, that's left towe_ec_cleanup
. A user discovered this problem, and I reproduced it by changing this lineto
to trigger a deliberate failure in
we_ec_p192_init
. If you do that and run the unit tests, you'll get a double free fault. This commit fixes this problem across thewe_ec_p*_init
functions.See ZD #14091.