Fixed potential memory leak when loading font file.
This commit is contained in:
parent
65b844170f
commit
35ac315b70
@ -261,6 +261,7 @@ bool imguiRenderGLInit(const char* fontpath)
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
if (readLen != size)
|
if (readLen != size)
|
||||||
{
|
{
|
||||||
|
free(ttfBuffer);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user