Diff between ee39d01fb9ee3d0953641a6681fed212ddb8fb0a and a13638e6ae38f4f5c035bc5fd2532f73f10888b6
Changed Files
| File | Additions | Deletions | Status |
| src/shared/uhid.c | +4 | -0 | modified |
Full Patch
diff --git a/src/shared/uhid.c b/src/shared/uhid.c
index 4f149fd..98d6198 100644
--- a/src/shared/uhid.c
+++ b/src/shared/uhid.c
@@ -504,6 +504,10 @@ int bt_uhid_destroy(struct bt_uhid *uhid, bool force)
if (!uhid)
return -EINVAL;
+ /* Cleanup input queue */
+ queue_destroy(uhid->input, free);
+ uhid->input = NULL;
+
/* Force destroy for non-keyboard devices - keyboards are not destroyed
* on disconnect since they can glitch on reconnection losing
* keypresses.