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

Commit 4bac7782 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

Change-Id: I8cb723ca43c3917faa690c191078e0575aa21625
parents a73be388 f14a061a
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);
}