From 1da12235c3bb896eea9fac2b6dc912eac12a3c01 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 15 Jun 2016 14:40:40 +1000 Subject: [PATCH] gl/upload/meta: remove unneeded texture deletion The textures are managed by the GstGLMemory inside the output buffer. Freeing them prematurely may result in a use-after-free. --- gst-libs/gst/gl/gstglupload.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index 87f230c..b68f7f1 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -910,16 +910,9 @@ static void _upload_meta_upload_free (gpointer impl) { struct GLUploadMeta *upload = impl; - gint i; g_return_if_fail (impl != NULL); - for (i = 0; i < GST_GL_UPLOAD_MAX_PLANES; i++) { - if (upload->texture_ids[i]) - gst_gl_context_del_texture (upload->upload->context, - &upload->texture_ids[i]); - } - if (upload->params) gst_gl_allocation_params_free ((GstGLAllocationParams *) upload->params); -- 2.7.4