Browse Source

mem leak in gltf loader (#995)

chriscamacho 5 years ago
parent
commit
3d8b1165a8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/models.c

+ 2 - 1
src/models.c

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