[vlc-commits] gl: android: fix memory leak and error code
Zhao Zhili
git at videolan.org
Fri May 18 13:27:47 CEST 2018
vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Thu May 17 20:22:29 2018 +0800| [270255bcdf9fd40456c3ddf1a0e8ab171b22c0ec] | committer: Thomas Guillem
gl: android: fix memory leak and error code
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=270255bcdf9fd40456c3ddf1a0e8ab171b22c0ec
---
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 ad0265f4b1..2e89544b24 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);
More information about the vlc-commits
mailing list