From ff24c59c2316df5e88162fb202df293873f60c17 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Wed, 11 Apr 2018 08:52:09 +0900 Subject: [PATCH] hwc: add omitted unlocks Change-Id: I7631a2a6d9549a5361a05de2ccdc3a65b0452b6c --- src/tdm_hwc_window.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tdm_hwc_window.c b/src/tdm_hwc_window.c index 8ef8042..25692b3 100644 --- a/src/tdm_hwc_window.c +++ b/src/tdm_hwc_window.c @@ -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; } -- 2.7.4