Diff between 0ba58ed345041fe51f36ced3f12d9c94017295f0 and 995d19a8d42a01c66e15346f8ad2fc36f847fdf0
Changed Files
| File | Additions | Deletions | Status |
| android/hidhost.c | +5 | -1 | modified |
Full Patch
diff --git a/android/hidhost.c b/android/hidhost.c
index 50ac50d..44310ed 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
@@ -1215,8 +1215,12 @@ bool bt_hid_register(const bdaddr_t *addr)
BT_IO_OPT_INVALID);
if (!intr_io) {
error("Failed to listen on intr channel: %s", err->message);
- g_io_channel_unref(ctrl_io);
g_error_free(err);
+
+ g_io_channel_shutdown(ctrl_io, TRUE, NULL);
+ g_io_channel_unref(ctrl_io);
+ ctrl_io = NULL;
+
return false;
}