st/omx/enc: check uninitialized list from task release

The uninitialized list should be checked and returned.

Thank Julien for the notification and suggested fix.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit b9d10e79c8)
This commit is contained in:
Leo Liu 2016-07-11 15:27:16 -04:00 committed by Emil Velikov
parent bf11931c95
commit 6deeccf5aa

View file

@ -874,8 +874,8 @@ static void enc_ReleaseTasks(struct list_head *head)
{
struct encode_task *i, *next;
if (!head)
return;
if (!head || !head->next)
return;
LIST_FOR_EACH_ENTRY_SAFE(i, next, head, list) {
pipe_resource_reference(&i->bitstream, NULL);