rxi / lite

A lightweight text editor written in Lua
MIT License
7.33k stars 348 forks source link

renderer.c: potential leak #295

Open luauser32167 opened 2 years ago

luauser32167 commented 2 years ago

In renderer.c:172, if fopen fails (the font file was not found), then the font variable allocated earlier is not freed.

I think this was the only problem found by clang-analyzer/scan-build. There are also a bunch of conversion warnings but those are probably harmless.

And thanks for the awesome "cached software renderer" :^).