Add safety check to sample mutex implementation

Due to inconsistent freeing strategy in pkparse.c the sample mutex
implementation in threading.c could lead to undefined behaviour by
destroying the same mutex several times.

This fix prevents mutexes from being destroyed several times in the
sample threading implementation.
This commit is contained in:
Janos Follath 2016-09-26 09:15:44 +01:00 committed by Simon Butcher
parent c47857dbf4
commit b48c8ac45d

View file

@ -42,6 +42,8 @@ Bugfix
* Fixed the sample applications gen_key.c, cert_req.c and cert_write.c for
builds where the configuration MBEDTLS_PEM_WRITE_C is not defined. Found
by inestlerode. #559.
* Fixed default threading implementation to avoid accidental double
initialisations and double frees.
Changes
* Extended test coverage of special cases, and added new timing test suite.