[vlc-devel] [PATCH 03/13] vout/opengl: fix leak if program check fails
Thomas Guillem
thomas at gllm.fr
Mon Dec 12 17:03:44 CET 2016
---
modules/video_output/opengl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 80fa814..2fb062b 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -708,7 +708,8 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
vgl->GetProgramiv(vgl->program[i], GL_LINK_STATUS, &link_status);
if (link_status == GL_FALSE) {
fprintf(stderr, "Unable to use program %d\n", i);
- free(vgl);
+ vlc_gl_Unlock(vgl->gl);
+ vout_display_opengl_Delete(vgl);
return NULL;
}
}
--
2.10.2
More information about the vlc-devel
mailing list