From ab945f5d23f3a1f43bd021f98d4de4234176d4ca Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 30 Jun 2014 16:47:53 +0300 Subject: [PATCH] android/hog: Fix not detaching on free --- android/hog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/hog.c b/android/hog.c index c094f723f..4f16111fe 100644 --- a/android/hog.c +++ b/android/hog.c @@ -712,6 +712,8 @@ static void hog_free(void *data) { struct bt_hog *hog = data; + bt_hog_detach(hog); + g_slist_free_full(hog->instances, hog_free); bt_scpp_unref(hog->scpp); @@ -719,7 +721,6 @@ static void hog_free(void *data) bt_bas_unref(hog->bas); bt_uhid_unref(hog->uhid); g_slist_free_full(hog->reports, report_free); - g_attrib_unref(hog->attrib); g_free(hog->name); g_free(hog->primary); g_free(hog);