[Mesa-dev] [PATCH v3] va: check null context in vlVaDestroyContext

Julien Isorce julien.isorce at gmail.com
Tue Apr 12 23:51:57 UTC 2016


Reviewed-by: Julien Isorce <j.isorce at samsung.com>

I'll push it shortly. Thx

On 12 April 2016 at 23:24, Iurie Salomov <iurcic at gmail.com> wrote:

> From: iurie salomov <iurcic at gmail.com>
>
> Signed-off-by: Iurie Salomov
> ---
>  src/gallium/state_trackers/va/context.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/state_trackers/va/context.c
> b/src/gallium/state_trackers/va/context.c
> index b25c381..932717d 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) ==
> --
> 1.9.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160413/575f5fa0/attachment.html>


More information about the mesa-dev mailing list