mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-27 05:28:29 +00:00
Make sure hidapi error handling is thread-safe
The hidapi method of storing the error on the device is not thread-safe, and not only could it result in a double free if multiple threads were setting the error at the same time, but SDL could be trying to use the error message and have it be freed out from under it by another thread. Use SDL's error functions since they already use thread-local storage.
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
/* Define standard library functions in terms of SDL */
|
||||
#define HIDAPI_USING_SDL_RUNTIME
|
||||
#define free SDL_free
|
||||
#define iconv_t SDL_iconv_t
|
||||
#define ICONV_CONST
|
||||
|
Reference in New Issue
Block a user