dinput: Return E_OUTOFMEMORY on allocation failure in hid_joystick_create_device().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dd5f3b6fc1
commit
ac7fa1677a
|
@ -2073,6 +2073,7 @@ HRESULT hid_joystick_create_device( struct dinput *dinput, const GUID *guid, IDi
|
|||
impl->attrs = attrs;
|
||||
list_init( &impl->effect_list );
|
||||
|
||||
hr = E_OUTOFMEMORY;
|
||||
preparsed = (struct hid_preparsed_data *)impl->preparsed;
|
||||
size = preparsed->input_caps_count * sizeof(struct object_properties);
|
||||
if (!(object_properties = calloc( 1, size ))) goto failed;
|
||||
|
|
Loading…
Reference in New Issue