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

Commit a7c93811 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by android-build-merger
Browse files

Protect the btif config state with a lock during cleanup am: 03bc5bd6 am: f14a061a

am: 4bac7782

Change-Id: Icaa34698cb98f593e55519efd2072bf11f06c951
parents 5cbc59f0 4bac7782
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -224,8 +224,10 @@ static future_t* clean_up(void) {
  btif_config_flush();

  alarm_free(config_timer);
  config_free(config);
  config_timer = NULL;

  std::unique_lock<std::mutex> lock(config_lock);
  config_free(config);
  config = NULL;
  return future_new_immediate(FUTURE_SUCCESS);
}