Merge "KW Warning Fixes"
diff --git a/location/LocationAPIClientBase.cpp b/location/LocationAPIClientBase.cpp
index 465b76d..d8eae3f 100644
--- a/location/LocationAPIClientBase.cpp
+++ b/location/LocationAPIClientBase.cpp
@@ -600,6 +600,7 @@
         if (sessions == NULL) {
             LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
                     __FUNCTION__, __LINE__, sizeof(uint32_t) * count);
+            pthread_mutex_unlock(&mMutex);
             return;
         }
 
@@ -634,6 +635,7 @@
         if (sessions == NULL) {
             LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
                     __FUNCTION__, __LINE__, sizeof(uint32_t) * count);
+            pthread_mutex_unlock(&mMutex);
             return;
         }
 
@@ -668,6 +670,7 @@
         if (sessions == NULL) {
             LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
                     __FUNCTION__, __LINE__, sizeof(uint32_t) * count);
+            pthread_mutex_unlock(&mMutex);
             return;
         }
 
@@ -702,6 +705,7 @@
         if (sessions == NULL) {
             LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
                     __FUNCTION__, __LINE__, sizeof(uint32_t) * count);
+            pthread_mutex_unlock(&mMutex);
             return;
         }
 
@@ -740,6 +744,7 @@
         if (sessions == NULL) {
             LOC_LOGE("%s:%d] Failed to allocate %d bytes !",
                     __FUNCTION__, __LINE__, sizeof(uint32_t) * count);
+            pthread_mutex_unlock(&mMutex);
             return;
         }