Zebediah Figura : dinput: Return E_OUTOFMEMORY on allocation failure in hid_joystick_create_device().

Alexandre Julliard julliard at winehq.org
Mon May 16 15:37:58 CDT 2022


Module: wine
Branch: master
Commit: ac7fa1677ab85764f6509179a2e47ce5aafbd446
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ac7fa1677ab85764f6509179a2e47ce5aafbd446

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Mon May 16 11:50:42 2022 +0200

dinput: Return E_OUTOFMEMORY on allocation failure in hid_joystick_create_device().

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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;




More information about the wine-cvs mailing list