mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 08:08:06 +02:00
progs/util: Fix memory leak if fread returns 0 in CompileShaderFile.
(cherry picked from commit 11905da883)
This commit is contained in:
parent
5683d7d43f
commit
4fb5ae7233
1 changed files with 1 additions and 0 deletions
|
|
@ -99,6 +99,7 @@ CompileShaderFile(GLenum shaderType, const char *filename)
|
|||
shader = CompileShaderText(shaderType, buffer);
|
||||
}
|
||||
else {
|
||||
fclose(f);
|
||||
free(buffer);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue