Rémi Bernon (@rbernon) commented about dlls/win32u/input.c:
+}; + +static struct pointer *find_pointerid(UINT32 id) +{ + struct pointer_thread_data *thread_data = get_pointer_thread_data(); + struct pointer *pointer; + + TRACE( "looking for pointer id %d\n", id ); + + LIST_FOR_EACH_ENTRY(pointer, &thread_data->known_pointers, struct pointer, entry) + if (pointer->id == id) + return pointer; + + TRACE( "allocating pointer id %d\n", id ); + + if (!thread_data || !(pointer = calloc( 1, sizeof(*pointer) ))) You have used thread_data before this check already, it's pointless to check it here. I'm also not sure we need to care about thread data allocation failure, it's extremely unlikely.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10649#note_136264