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_error_code(param->result), (bt_device_att_mtu_info_s *)mtu_info,
bt_event_slot_container[event_index].user_data);
+ g_free(mtu_info);
+
break;
}
case BLUETOOTH_EVENT_LE_DATA_LENGTH_CHANGED: