Fix bt-service crash issue. 44/156644/1
authorDeokhyun Kim <dukan.kim@samsung.com>
Thu, 19 Oct 2017 08:25:18 +0000 (17:25 +0900)
committerDeokhyun Kim <dukan.kim@samsung.com>
Thu, 19 Oct 2017 08:27:10 +0000 (17:27 +0900)
 - le_adv_slot is accessed in __bt_hold_current_advertising_timeout_cb()
   after it's freed.

Change-Id: I2fa6770334d942979f953ce39cfba2f051913e37
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
bt-service/bt-service-adapter-le.c

index 01aaad0..98ca9b5 100644 (file)
@@ -88,6 +88,8 @@ static void __bt_free_le_adv_slot(void)
        for (i = 0; i < le_feature_info.adv_inst_max; i++) {
                if (le_adv_slot[i].sender)
                        g_free(le_adv_slot[i].sender);
+               if (le_adv_slot[i].hold_timer_id > 0)
+                       g_source_remove(le_adv_slot[i].hold_timer_id);
        }
        g_free(le_adv_slot);
        le_adv_slot = NULL;