From b9d10e79c88842ba05d6937a3803cb5740b866da Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 11 Jul 2016 15:27:16 -0400 Subject: [PATCH] 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 Cc: "12.0" --- src/gallium/state_trackers/omx/vid_enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c index bbc7941ffe0..642238e53f0 100644 --- a/src/gallium/state_trackers/omx/vid_enc.c +++ b/src/gallium/state_trackers/omx/vid_enc.c @@ -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); -- 2.30.2