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

Commit f14a061a 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

Change-Id: I47a3b5efc680954afc11e58f16c440284ba016a9
parents 47aa262f 03bc5bd6
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);
}