mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-03 02:17:39 +00:00
Revert "Fixed double-free during multi-threaded hidapi access"
This reverts commit 2b386b6c80
.
This isn't the right approach. Even if the string itself isn't double-freed, it can be returned to the application and then freed while the application is trying to use it. This really needs to be in thread-local storage to be completely safe.
In SDL we already have a global thread-local error string, so I'm going to make an SDL-specific change to handle the error strings safely.
This commit is contained in:
parent
1c9aae9a29
commit
d51f84a2e1
4 changed files with 8 additions and 45 deletions
|
@ -529,7 +529,6 @@ static void HIDAPI_ShutdownDiscovery(void)
|
|||
/* Platform HIDAPI Implementation */
|
||||
|
||||
#define HIDAPI_IGNORE_DEVICE(VID, PID) SDL_HIDAPI_ShouldIgnoreDevice(VID, PID)
|
||||
#define HIDAPI_ATOMIC_SET_POINTER(a, v) SDL_AtomicSetPtr((void **)a, v)
|
||||
|
||||
struct PLATFORM_hid_device_;
|
||||
typedef struct PLATFORM_hid_device_ PLATFORM_hid_device;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue