From ac7fa1677ab85764f6509179a2e47ce5aafbd446 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 16 May 2022 11:50:42 +0200 Subject: [PATCH] dinput: Return E_OUTOFMEMORY on allocation failure in hid_joystick_create_device(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: RĂ©mi Bernon Signed-off-by: Alexandre Julliard --- dlls/dinput/joystick_hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index ddd67be4fd0..171ef4e2640 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -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;