hwc: add omitted unlocks 86/175586/1
authorBoram Park <boram1288.park@samsung.com>
Tue, 10 Apr 2018 23:52:09 +0000 (08:52 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 10 Apr 2018 23:53:12 +0000 (08:53 +0900)
Change-Id: I7631a2a6d9549a5361a05de2ccdc3a65b0452b6c

src/tdm_hwc_window.c

index 8ef80429e98f4960cf630c28b77c2fe34b020f89..25692b3dba14326e763e9e453777fe4b1d59858f 100644 (file)
@@ -462,6 +462,7 @@ tdm_hwc_window_commit(tdm_hwc_window *hwc_window, tdm_hwc_window_commit_handler
                ret = tdm_layer_unset_buffer_internal(private_layer);
        if (ret != TDM_ERROR_NONE) {
                TDM_ERR("failed: layer set buffer(window)");
+               _pthread_mutex_unlock(&private_display->lock);
                return ret;
        }
 
@@ -469,6 +470,7 @@ tdm_hwc_window_commit(tdm_hwc_window *hwc_window, tdm_hwc_window_commit_handler
                                                                                                                   &window_info);
        if (ret != TDM_ERROR_NONE) {
                TDM_ERR("failed: commit layer(window)");
+               _pthread_mutex_unlock(&private_display->lock);
                return ret;
        }
 
@@ -476,12 +478,14 @@ tdm_hwc_window_commit(tdm_hwc_window *hwc_window, tdm_hwc_window_commit_handler
        ret = tdm_layer_set_info_internal(private_layer, info_layer);
        if (ret != TDM_ERROR_NONE) {
                TDM_ERR("failed: layer set info(window)");
+               _pthread_mutex_unlock(&private_display->lock);
                return ret;
        }
 
        hwc_window_commit_handler = calloc(1, sizeof(tdm_private_hwc_window_commit_handler));
        if (!hwc_window_commit_handler) {
                TDM_ERR("failed: alloc memory");
+               _pthread_mutex_unlock(&private_display->lock);
                return TDM_ERROR_OUT_OF_MEMORY;
        }
 
@@ -493,6 +497,7 @@ tdm_hwc_window_commit(tdm_hwc_window *hwc_window, tdm_hwc_window_commit_handler
        if (ret != TDM_ERROR_NONE) {
                TDM_ERR("failed: commit layer(window)");
                free(hwc_window_commit_handler);
+               _pthread_mutex_unlock(&private_display->lock);
                return ret;
        }