Diff between d96c9ad20960134657709b815cdc5922d2ba7efc and 41f8a6d5214840b8e8219a1bb4758b5620834a98
Changed Files
| File | Additions | Deletions | Status |
| src/adapter.c | +9 | -0 | modified |
Full Patch
diff --git a/src/adapter.c b/src/adapter.c
index e8a983a..b7a564f 100644
--- 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;
}