msdk: decoder: fix an usage-after-free pointer bug

This commit is contained in:
Víctor Manuel Jáquez Leal 2019-01-21 15:53:23 +01:00
parent 85c75bb23b
commit 882befb5db

View file

@ -161,9 +161,9 @@ free_surface (GstMsdkDec * thiz, MsdkSurface * s)
gst_video_frame_unmap (&s->data);
gst_buffer_unref (s->buf);
thiz->decoded_msdk_surfaces = g_list_remove (thiz->decoded_msdk_surfaces, s);
g_slice_free (MsdkSurface, s);
thiz->decoded_msdk_surfaces = g_list_remove (thiz->decoded_msdk_surfaces, s);
}
static MsdkSurface *