Change-Id: I97e163ff7e5826fad15c01ac7ecde11c6ff12ade
Signed-off-by: Changyeon Lee <cyeon.lee@samsung.com>
surface_queue->node_list = (queue_node **) calloc(queue_size, sizeof(queue_node *));
if (!surface_queue->node_list) {
TBM_LOG("surface node list alloc failed");
- free(surface_queue);
pthread_mutex_destroy(&surface_queue->lock);
+ free(surface_queue);
return NULL;
}
_queue_node_delete(surface_queue->node_list[i]);
free(surface_queue->node_list);
+ pthread_mutex_destroy(&surface_queue->lock);
free(surface_queue);
}