summaryrefslogtreecommitdiff
path: root/docs/USBX_Device_Stack_User_Guide_Supplemental.pdf
diff options
context:
space:
mode:
authorKajtek Lau <[email protected]>2026-06-04 13:03:06 -0700
committerGitHub <[email protected]>2026-06-04 16:03:06 -0400
commita5fd35face7c364b00fd2fdecbac0c3ca45f659b (patch)
treef25f4188e95e6d7eb3601a34315ebaed9bb6c109 /docs/USBX_Device_Stack_User_Guide_Supplemental.pdf
parent94cdd1e0e34573dac3f2c5dadb1c4f68a2857435 (diff)
fix(hid): Store client instance per-device instead of per-class (#262)
* fix(hid): Store client instance per-device instead of per-class * Address review feedback on per-instance HID client copy Three issues fixed, discovered during maintainer review: 1. Memory leak in standalone activation error path (entry.c): _ux_host_class_hid_client_activate_wait() set hid_client to NULL without freeing the per-instance copy allocated in client_search. The HID_ENUM_ERROR handler destroys the hid struct without freeing hid_client, so the copy was leaked on every standalone activation failure. Fixed by freeing hid_client before clearing it. 2. Variable declared inside if-block (client_search.c): hid_client_instance was declared inside the if (status == UX_SUCCESS) block, which is a C99 feature. USBX targets C89/C90 embedded toolchains. Moved to the top of the function with other locals. 3. Trailing whitespace throughout both changed files: The PR introduced trailing spaces on most comment-block lines. Reverted all affected lines to their original whitespace. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Frédéric Desbiens <[email protected]> Co-authored-by: Copilot <[email protected]>
Diffstat (limited to 'docs/USBX_Device_Stack_User_Guide_Supplemental.pdf')
0 files changed, 0 insertions, 0 deletions