fix deadlock problem in queue_reset 40/90640/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 3 Oct 2016 09:53:30 +0000 (18:53 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 4 Oct 2016 04:36:38 +0000 (21:36 -0700)
Change-Id: I925902b3ad82a5d718d7dd0f1c6c50ec66e8ab82

src/tbm_surface_queue.c

index 86fd751..51fcfc0 100644 (file)
@@ -1244,8 +1244,10 @@ tbm_surface_queue_reset(tbm_surface_queue_h
        TBM_QUEUE_TRACE("tbm_surface_queue(%p)\n", surface_queue);
 
        if (width == surface_queue->width && height == surface_queue->height &&
-           format == surface_queue->format)
+           format == surface_queue->format) {
+               _tbm_surf_queue_mutex_unlock();
                return TBM_SURFACE_QUEUE_ERROR_NONE;
+       }
 
        pthread_mutex_lock(&surface_queue->lock);