Browse Source

Fix memory leak in LoadGLTF() (#929)

Free texturePath in LoadGLTF()
Michael Vetter 6 years ago
parent
commit
6267fd1865
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/models.c

+ 1 - 0
src/models.c

@@ -3457,6 +3457,7 @@ static Model LoadGLTF(const char *fileName)
                         ImageColorTint(&image, tint);
                         texture = LoadTextureFromImage(image);
                         UnloadImage(image);
+                        RL_FREE(texturePath);
                     }
                 }
                 else if (img->buffer_view)