adapter_proxy = _bt_get_adapter_proxy();
retv_if(adapter_proxy == NULL, BLUETOOTH_ERROR_INTERNAL);
*/
- conn = _bt_get_system_gconn();
+ conn = _bt_gdbus_get_system_gconn();
retv_if(conn == NULL, BLUETOOTH_ERROR_INTERNAL);
_bt_convert_addr_type_to_string(address, device_address->addr);
func_data = g_malloc0(sizeof(bt_function_data_t));
- /* Fix : NULL_RETURNS */
- retv_if(func_data == NULL, BLUETOOTH_ERROR_MEMORY_ALLOCATION);
-
func_data->address = g_strdup(address);
func_data->req_id = request_id;
uuid = HID_UUID;
if (ret != BLUETOOTH_ERROR_NONE) {
BT_ERR("_bt_connect_profile Error");
+ g_free(func_data->address);
+ g_free(func_data);
return ret;
}
return BLUETOOTH_ERROR_NONE;
adapter_proxy = _bt_get_adapter_proxy();
retv_if(adapter_proxy == NULL, BLUETOOTH_ERROR_INTERNAL);
*/
- conn = _bt_get_system_gconn();
+ conn = _bt_gdbus_get_system_gconn();
retv_if(conn == NULL, BLUETOOTH_ERROR_INTERNAL);
_bt_convert_addr_type_to_string(address, device_address->addr);
func_data = g_malloc0(sizeof(bt_function_data_t));
- /* Fix : NULL_RETURNS */
- retv_if(func_data == NULL, BLUETOOTH_ERROR_MEMORY_ALLOCATION);
-
func_data->address = g_strdup(address);
func_data->req_id = request_id;
if (ret != BLUETOOTH_ERROR_NONE) {
BT_ERR("_bt_disconnect_profile Error");
+ g_free(func_data->address);
+ g_free(func_data);
return ret;
}