Closed mwerezak closed 1 year ago
A library should NEVER ask an application to free dynamically allocated memory. Unless the library is statically linked to the application, there is no guarantee that a free() in the application will line up with a malloc() in the library.
See this discussion, for example.
This PR removes the dynamically allocated error message strings and instead writes the messages to a caller specified buffer.
Looks like this repo is long dead. If anyone is interested in the updated code, please see https://github.com/mwerezak/TEMPered
A library should NEVER ask an application to free dynamically allocated memory. Unless the library is statically linked to the application, there is no guarantee that a free() in the application will line up with a malloc() in the library.
See this discussion, for example.
This PR removes the dynamically allocated error message strings and instead writes the messages to a caller specified buffer.