[vlc-commits] opengl: fix leak on error

Zhao Zhili git at videolan.org
Wed Apr 18 14:52:22 CEST 2018


vlc/vlc-3.0 | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Wed Apr 18 20:43:49 2018 +0800| [255a5fbd844d2ad5237eda31ae40ac202b481e58] | committer: Thomas Guillem

opengl: fix leak on error

Signed-off-by: Thomas Guillem <thomas at gllm.fr>
(cherry picked from commit e235d31e5b36eea6547f8e72af8836ac81f5887a)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 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 0032010403..6c664b3f38 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -651,7 +651,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 */



More information about the vlc-commits mailing list