mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-28 02:21:08 +00:00
glamor: fix memleak in error path of glamor_link_glsl_prog()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
ab7b2b44f3
commit
482f7b326d
1 changed files with 5 additions and 1 deletions
|
|
@ -111,9 +111,13 @@ glamor_link_glsl_prog(ScreenPtr screen, GLint prog, const char *format, ...)
|
|||
|
||||
glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &size);
|
||||
GLchar *info = calloc(1, size);
|
||||
|
||||
if (!info) {
|
||||
ErrorF("Failed to link AND out of memory on retrieving the reason\n");
|
||||
return FALSE;
|
||||
}
|
||||
glGetProgramInfoLog(prog, size, NULL, info);
|
||||
ErrorF("Failed to link: %s\n", info);
|
||||
free(info);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue