Message ID | 20240813142935.504400-2-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a13638e6ae38f4f5c035bc5fd2532f73f10888b6 |
Headers | show |
Series | [BlueZ,v3,1/2] shared/uhid: Fix registering UHID_START multiple times | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
diff --git a/src/shared/uhid.c b/src/shared/uhid.c index 4f149fdb8c4d..98d6198c7d0a 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.
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> The input queue shall be cleanup on bt_uhid_destroy since that shall not be carried to the next session even if the input node is not destroyed. --- src/shared/uhid.c | 4 ++++ 1 file changed, 4 insertions(+)