Skip to content

Commit

Permalink
Add a cleanup call in the callback
Browse files Browse the repository at this point in the history
  • Loading branch information
k1-801 committed Apr 5, 2024
1 parent f6fca11 commit 6f901b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions windows/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,8 @@ DWORD WINAPI hid_internal_notify_callback(HCMNOTIFICATION notify,
if (hotplug_event == HID_API_HOTPLUG_EVENT_DEVICE_LEFT) {
free(device);
}

hid_internal_hotplug_cleanup();
}

LeaveCriticalSection(&hid_hotplug_context.critical_section);
Expand Down

0 comments on commit 6f901b2

Please sign in to comment.