mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
progs/util: Fix memory leak if fread returns 0 in CompileShaderFile.
This commit is contained in:
parent
6418ce7df6
commit
11905da883
1 changed files with 1 additions and 0 deletions
|
|
@ -95,6 +95,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