mem leak in gltf loader (#995)

This commit is contained in:
chriscamacho 2019-10-23 09:42:17 +01:00 committed by Ray
parent 163a9e1f41
commit 3d8b1165a8

View File

@ -3419,7 +3419,8 @@ static Texture LoadTextureFromCgltfImage(cgltf_image *image, const char *texPath
free(data); free(data);
Image rimage = LoadImagePro(raw, w, h, UNCOMPRESSED_R8G8B8A8); Image rimage = LoadImagePro(raw, w, h, UNCOMPRESSED_R8G8B8A8);
free(raw);
// TODO: Tint shouldn't be applied here! // TODO: Tint shouldn't be applied here!
ImageColorTint(&rimage, tint); ImageColorTint(&rimage, tint);
texture = LoadTextureFromImage(rimage); texture = LoadTextureFromImage(rimage);