[vlc-commits] vout/opengl: fix use-after-free

Thomas Guillem git at videolan.org
Mon Nov 13 16:46:18 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Nov 13 16:46:05 2017 +0100| [be38fffaa18148ebe5bc4dc70086e8e5c7bc3bd3] | committer: Thomas Guillem

vout/opengl: fix use-after-free

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=be38fffaa18148ebe5bc4dc70086e8e5c7bc3bd3
---

 modules/video_output/opengl/vout_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 48f684661d..1fbbfc3665 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -560,7 +560,6 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm)
         module_unneed(tc, tc->p_module);
     else if (tc->priv != NULL)
         opengl_tex_converter_generic_deinit(tc);
-    vlc_object_release(tc);
     if (prgm->id != 0)
         vgl->vt.DeleteProgram(prgm->id);
 
@@ -569,6 +568,8 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm)
     if (tc->pl_ctx)
         pl_context_destroy(&tc->pl_ctx);
 #endif
+
+    vlc_object_release(tc);
 }
 
 #ifdef HAVE_LIBPLACEBO



More information about the vlc-commits mailing list