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

Commit b2ee691f authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Add missing mutex lock/unlock inside alarm_cleanup()

Bug: 26982349
Change-Id: I32f4e6450491adcc1e12e71fb8bb582d6397a91a
parent 4b7600eb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -292,6 +292,8 @@ void alarm_cleanup(void) {
  if (!alarms)
    return;

  pthread_mutex_lock(&monitor);

  dispatcher_thread_active = false;
  semaphore_post(alarm_expired);
  thread_free(dispatcher_thread);
@@ -308,6 +310,7 @@ void alarm_cleanup(void) {
  list_free(alarms);
  alarms = NULL;

  pthread_mutex_unlock(&monitor);
  pthread_mutex_destroy(&monitor);
}