Ignore vconfkey value change for AVC mode on
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-adapter.c
index eb358f2..888b792 100644 (file)
@@ -1228,7 +1228,7 @@ static gboolean __bt_disconnect_all(void)
        GVariant *result;
        GError *error = NULL;
        GArray *device_list;
-       bluetooth_device_info_t info;
+       bluetooth_device_info_t *info;
        guint size;
        char *device_path = NULL;
        char address[BT_ADDRESS_STRING_SIZE] = { 0 };
@@ -1250,12 +1250,12 @@ static gboolean __bt_disconnect_all(void)
 
        for (i = 0; i < size; i++) {
 
-               info = g_array_index(device_list,
+               info = &g_array_index(device_list,
                                bluetooth_device_info_t, i);
 
-               if (info.connected != BLUETOOTH_CONNECTED_LINK_NONE) {
+               if (info->connected != BLUETOOTH_CONNECTED_LINK_NONE) {
                        BT_DBG("Found Connected device");
-                       _bt_convert_addr_type_to_string(address, info.device_address.addr);
+                       _bt_convert_addr_type_to_string(address, info->device_address.addr);
                        device_path = _bt_get_device_object_path(address);
                        if (device_path == NULL)
                                continue;
@@ -1928,6 +1928,7 @@ int _bt_is_service_used(char *service_uuid, gboolean *used)
        }
        g_variant_iter_free(iter);
        g_variant_unref(result);
+       g_variant_unref(temp);
 
        BT_DBG("Service Used? %d", *used);