freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] A suspicious memory leak in src/truetype/ttgload.c: tt_loader_init


From: Grissiom
Subject: [ft] A suspicious memory leak in src/truetype/ttgload.c: tt_loader_init
Date: Fri, 15 May 2015 19:11:59 +0800

Hi all,

I'm porting FreeType-2.5.5 to an embedded RTOS. However, I found memory leak in looped `FT_Load_Char(fft->face, *text_ptr, FT_LOAD_RENDER)` while the memory won't leak if I set the load_flags ORed with FT_LOAD_NO_HINTING.

So I dive into the source code and found in the tt_loader_init, the `size->bytecode_ready` and `size->cvt_ready` are always -1, causing `tt_size_ready_bytecode` run on the same `size` repeatedly. So the previous content of size will be leaked.

I don't whether it is a bug in FreeType or a mis-using of the lib. So any guidance will be appreciated and I will provide anything I could if you need.

P.S. Great thanks to the FreeType devs! World get rendered and hinted because of you. ;)

--
Cheers,
Grissiom

reply via email to

[Prev in Thread] Current Thread [Next in Thread]