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:
d96c9ad
)
core: Be safe and unregister index added/removed handlers
author
Marcel Holtmann
<marcel@holtmann.org>
Fri, 4 Jan 2013 18:39:02 +0000
(10:39 -0800)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 4 Jan 2013 18:39:02 +0000
(10:39 -0800)
src/adapter.c
patch
|
blob
|
history
diff --git
a/src/adapter.c
b/src/adapter.c
index
e8a983a
..
b7a564f
100644
(file)
--- a/
src/adapter.c
+++ b/
src/adapter.c
@@
-4007,6
+4007,15
@@
void adapter_cleanup(void)
btd_adapter_unref(adapter);
}
+ /*
+ * In case there is another reference active, clear out
+ * registered handlers for index added and index removed.
+ *
+ * This is just an extra precaution to be safe, and in
+ * reality should not make a difference.
+ */
+ mgmt_unregister_index(mgmt, MGMT_INDEX_NONE);
+
mgmt_unref(mgmt);
mgmt = NULL;
}