void *user_data = data->user_data;
free(data);
- bt_map_client_message_s* res = malloc(sizeof(*res));
+ bt_map_client_message_s *res = g_malloc0(sizeof(bt_map_client_message_s));
res->file_path = target_file;
((bt_map_client_get_message_cb)bt_event_slot_container[event_index].callback)(
param->result, res, user_data);
+ g_free(res);
break;
case BLUETOOTH_EVENT_MAP_PUSH_MESSAGE_COMPLETE:
__bt_get_bt_device_att_mtu_info_s(&mtu_info, (bluetooth_le_att_mtu_info_t *)(param->param_data));
((bt_device_att_mtu_changed_cb)bt_event_slot_container[event_index].callback)
(_bt_get_error_code(param->result), mtu_info, bt_event_slot_container[event_index].user_data);
+
+ g_free(mtu_info);
break;
}
case BLUETOOTH_EVENT_LE_DATA_LENGTH_CHANGED: