Commit 270255bc authored by Zhao Zhili's avatar Zhao Zhili Committed by Thomas Guillem

gl: android: fix memory leak and error code

Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent 9e83c78f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment