KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
866 stars 227 forks source link

Memoy leak when ktxTexture2_DeflateZstd fails #892

Closed j-cano closed 5 months ago

j-cano commented 5 months ago

Hi,

In the file writer2.c, function ktxTexture2_DeflateZstd, there is a memory leak with the variable cctx when any error happens before the ZSTD_freeCCtx call.

Can anyone fix it?

Thanks. I love this software :)