[vlc-devel] [PATCH 3/3] gl: android: fix memory leak and error code
Zhao Zhili
quinkblack at foxmail.com
Thu May 17 14:22:29 CEST 2018
---
modules/video_output/opengl/converter_android.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/opengl/converter_android.c b/modules/video_output/opengl/converter_android.c
index ad0265f..2e89544 100644
--- a/modules/video_output/opengl/converter_android.c
+++ b/modules/video_output/opengl/converter_android.c
@@ -264,7 +264,10 @@ Open(vlc_object_t *obj)
char *code;
if (asprintf(&code, template, tc->glsl_version, tc->glsl_precision_header) < 0)
- return 0;
+ {
+ free(tc->priv);
+ return VLC_EGENERIC;
+ }
GLuint fragment_shader = tc->vt->CreateShader(GL_FRAGMENT_SHADER);
tc->vt->ShaderSource(fragment_shader, 1, (const char **) &code, NULL);
tc->vt->CompileShader(fragment_shader);
--
2.9.5
More information about the vlc-devel
mailing list