From 3b531f5eeabcb34c0e1dd36cd581950a76fc50df Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Mon, 14 Sep 2020 11:09:03 +0900 Subject: [PATCH] Add shared connection unref logic g_object_unref is required not only private conn but also shared conn Change-Id: I504b3408158fc99aca36c4b9f08caed150949f48 Signed-off-by: Wootak Jung --- bt-api/bt-common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bt-api/bt-common.c b/bt-api/bt-common.c index e180960..2dd2700 100644 --- a/bt-api/bt-common.c +++ b/bt-api/bt-common.c @@ -2563,5 +2563,10 @@ BT_EXPORT_API int bluetooth_unregister_callback(void) profile_gproxy = NULL; } + if (system_common_conn) { + g_object_unref(system_common_conn); + system_common_conn = NULL; + } + return BLUETOOTH_ERROR_NONE; } -- 2.7.4