Add missing mutex lock/unlock inside alarm_cleanup()

Bug: 26982349
Change-Id: I32f4e6450491adcc1e12e71fb8bb582d6397a91a
diff --git a/system/osi/src/alarm.c b/system/osi/src/alarm.c
index 2a115e6..d070678 100644
--- a/system/osi/src/alarm.c
+++ b/system/osi/src/alarm.c
@@ -292,6 +292,8 @@
   if (!alarms)
     return;
 
+  pthread_mutex_lock(&monitor);
+
   dispatcher_thread_active = false;
   semaphore_post(alarm_expired);
   thread_free(dispatcher_thread);
@@ -308,6 +310,7 @@
   list_free(alarms);
   alarms = NULL;
 
+  pthread_mutex_unlock(&monitor);
   pthread_mutex_destroy(&monitor);
 }