mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 21:17:45 +00:00
iOS: Fixed pointer dereference after free.
This commit is contained in:
@@ -228,9 +228,6 @@ SDL_SYS_RemoveJoystickDevice(SDL_JoystickDeviceItem *device)
|
|||||||
}
|
}
|
||||||
#endif /* SDL_JOYSTICK_MFI */
|
#endif /* SDL_JOYSTICK_MFI */
|
||||||
|
|
||||||
SDL_free(device->name);
|
|
||||||
SDL_free(device);
|
|
||||||
|
|
||||||
--numjoysticks;
|
--numjoysticks;
|
||||||
|
|
||||||
#if !SDL_EVENTS_DISABLED
|
#if !SDL_EVENTS_DISABLED
|
||||||
@@ -245,6 +242,9 @@ SDL_SYS_RemoveJoystickDevice(SDL_JoystickDeviceItem *device)
|
|||||||
}
|
}
|
||||||
#endif /* !SDL_EVENTS_DISABLED */
|
#endif /* !SDL_EVENTS_DISABLED */
|
||||||
|
|
||||||
|
SDL_free(device->name);
|
||||||
|
SDL_free(device);
|
||||||
|
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user