[Mesa-dev] [PATCH] st/omx/enc: check uninitialized list from task release
Leo Liu
leo.liu at amd.com
Wed Jul 13 13:32:59 UTC 2016
The uninitialized list should be checked and returned.
Thank Julien for the notification and suggested fix.
Signed-off-by: Leo Liu <leo.liu at amd.com>
Cc: "12.0" <mesa-stable at lists.freedesktop.org>
---
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 d70439a..c9d9ab1 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);
--
1.9.1
More information about the mesa-dev
mailing list