From e62b321efeb910c7f88724c76049a2a0b98171f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Fri, 31 May 2019 13:08:39 +0200 Subject: [PATCH] libs: dec: vp9: clear parser pointer after release Fix an use-after-release of the parser pointer in VP9 decoder. --- gst-libs/gst/vaapi/gstvaapidecoder_vp9.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c index b2a605c398..edb052f9fc 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c @@ -118,8 +118,7 @@ gst_vaapi_decoder_vp9_close (GstVaapiDecoderVp9 * decoder) for (i = 0; i < GST_VP9_REF_FRAMES; i++) gst_vaapi_picture_replace (&priv->ref_frames[i], NULL); - if (priv->parser) - gst_vp9_parser_free (priv->parser); + g_clear_pointer (&priv->parser, gst_vp9_parser_free); } static gboolean