Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89a43992 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "floss: A2DP: Avoid use-after-free of UIPC" into main

parents a5166e46 9e6b51eb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -232,6 +232,10 @@ static BluetoothAudioPort const* bluetooth_audio_port = &null_audio_port;
// Initialize BluetoothAudio HAL: openProvider
bool init(bluetooth::common::MessageLoopThread* /*message_loop*/,
          BluetoothAudioPort const* audio_port, bool /*offload_enabled*/) {
  if (a2dp_uipc != nullptr) {
    log::warn("Re-init-ing UIPC that is already running");
    cleanup();
  }
  a2dp_uipc = UIPC_Init();
  total_bytes_read_ = 0;
  data_position_ = {};