From 358026747959a1c05372f0ebfbcdc45dd0a5a560 Mon Sep 17 00:00:00 2001 From: Leonardo Montagner <32098074+leomonta@users.noreply.github.com> Date: Tue, 26 Apr 2022 12:25:39 +0200 Subject: [PATCH] Fix Issue #2441 (#2442) Remove line that caused a memory leak --- src/rmodels.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rmodels.c b/src/rmodels.c index 9f5cfd397..d02b0473d 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -4643,7 +4643,6 @@ static Model LoadGLTF(const char *fileName) // Load our model data: meshes and materials model.meshCount = primitivesCount; model.meshes = RL_CALLOC(model.meshCount, sizeof(Mesh)); - for (int i = 0; i < model.meshCount; i++) model.meshes[i].vboId = (unsigned int*)RL_CALLOC(MAX_MESH_VERTEX_BUFFERS, sizeof(unsigned int)); // NOTE: We keep an extra slot for default material, in case some mesh requires it model.materialCount = (int)data->materials_count + 1;