mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-11 22:42:31 +02:00
Don't do NULL-checks before free()
This commit is contained in:
committed by
Sam Lantinga
parent
aaee09d6ed
commit
3b0347ac48
@@ -991,9 +991,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
|
||||
break;
|
||||
}
|
||||
|
||||
if (device_interface_list != NULL) {
|
||||
free(device_interface_list);
|
||||
}
|
||||
free(device_interface_list); // This should NOT be SDL_free()
|
||||
|
||||
device_interface_list = (wchar_t*)calloc(len, sizeof(wchar_t));
|
||||
if (device_interface_list == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user