[vlc-devel] [PATCH 1/2] vout/opengl: fix leak

Zhao Zhili quinkblack at foxmail.com
Sat Apr 28 05:19:27 CEST 2018


---
 src/video_output/opengl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video_output/opengl.c b/src/video_output/opengl.c
index c294641..b700fa4 100644
--- a/src/video_output/opengl.c
+++ b/src/video_output/opengl.c
@@ -148,7 +148,7 @@ vlc_gl_t *vlc_gl_surface_Create(vlc_object_t *obj,
     vlc_gl_t *gl = vlc_gl_Create(surface, VLC_OPENGL, NULL);
     if (gl == NULL) {
         vout_window_Delete(surface);
-        return NULL;
+        goto error;
     }
 
     vlc_gl_Resize(gl, cfg->width, cfg->height);
-- 
2.9.5





More information about the vlc-devel mailing list