[vlc-devel] [PATCH] opengl: fix leak on error

Zhao Zhili quinkblack at foxmail.com
Wed Apr 18 14:43:49 CEST 2018


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

diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 2bf4f81..7b988de 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -649,7 +649,10 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm,
             vlc_fourcc_GetChromaDescription(fmt->i_chroma);
 
         if (desc == NULL)
+        {
+            vlc_object_release(tc);
             return VLC_EGENERIC;
+        }
         if (desc->plane_count == 0)
         {
             /* Opaque chroma: load a module to handle it */
-- 
2.9.5





More information about the vlc-devel mailing list