[Mesa-dev] 0001-va-check-null-context-in-vlVaDestroyContext.patch

Iurie iurcic at gmail.com
Mon Apr 11 21:24:08 UTC 2016


>From d6a5bbd910dc19d4863dbac8eba5bdf07bd1c3ab Mon Sep 17 00:00:00 2001
From: GreatMaster <iurcic at gmail.com>
Date: Mon, 11 Apr 2016 21:37:02 +0100
Subject: [PATCH] va: check null context in vlVaDestroyContext

---
 src/gallium/state_trackers/va/context.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/state_trackers/va/context.c
b/src/gallium/state_trackers/va/context.c
index b25c381..419b271 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -283,6 +283,8 @@ vlVaDestroyContext(VADriverContextP ctx, VAContextID
context_id)
    drv = VL_VA_DRIVER(ctx);
    pipe_mutex_lock(drv->mutex);
    context = handle_table_get(drv->htab, context_id);
+    if (!context)
+      return VA_STATUS_ERROR_INVALID_CONTEXT;

    if (context->decoder) {
       if (u_reduce_video_profile(context->decoder->profile) ==
-- 
1.9.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160411/02582a7a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-va-check-null-context-in-vlVaDestroyContext.patch
Type: text/x-patch
Size: 887 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160411/02582a7a/attachment.bin>


More information about the mesa-dev mailing list