mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-04 19:48:03 +00:00
server: Avoid reallocating rawinput device array with zero size.
It actually frees the pointer.
This commit is contained in:
parent
1cbbbd9d73
commit
28aa321f36
|
@ -3380,6 +3380,14 @@ DECL_HANDLER(update_rawinput_devices)
|
|||
size_t size = device_count * sizeof(*devices);
|
||||
struct process *process = current->process;
|
||||
|
||||
if (!size)
|
||||
{
|
||||
process->rawinput_device_count = 0;
|
||||
process->rawinput_mouse = NULL;
|
||||
process->rawinput_kbd = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(tmp = realloc( process->rawinput_devices, size )))
|
||||
{
|
||||
set_error( STATUS_NO_MEMORY );
|
||||
|
|
Loading…
Reference in a new issue