OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ba58ed
)
android/hidhost: Shutdown ctrl_io channel if intr_io fails
author
Andrei Emeltchenko
<andrei.emeltchenko@intel.com>
Thu, 28 Nov 2013 14:38:03 +0000
(16:38 +0200)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Fri, 29 Nov 2013 08:29:55 +0000
(10:29 +0200)
This fix possible memory leak.
android/hidhost.c
patch
|
blob
|
history
diff --git
a/android/hidhost.c
b/android/hidhost.c
index
50ac50d
..
44310ed
100644
(file)
--- 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;
}