diff options
author | Iurie Salomov <[email protected]> | 2016-04-12 23:24:30 +0100 |
---|---|---|
committer | Julien Isorce <[email protected]> | 2016-04-13 00:52:53 +0100 |
commit | 047e3264f67bc54365be7b0e163b6910a9e9de3a (patch) | |
tree | 43cac11b33afe2f2fbe292ca1a387a4bbd2331ee /src | |
parent | 8f3b516f2e9e3066792fe244351427f8775ce214 (diff) |
va: check null context in vlVaDestroyContext
Signed-off-by: Iurie Salomov <[email protected]>
Reviewed-by: Julien Isorce <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/va/context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index b25c381d968..25d587af46f 100644 --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -283,6 +283,10 @@ 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) { + pipe_mutex_unlock(drv->mutex); + return VA_STATUS_ERROR_INVALID_CONTEXT; + } if (context->decoder) { if (u_reduce_video_profile(context->decoder->profile) == |