From 08e9ac0a8c07d17afe55d3cebe4ae442c5531fbc Mon Sep 17 00:00:00 2001 From: Leonardo Montagner <32098074+leomonta@users.noreply.github.com> Date: Tue, 26 Apr 2022 12:15:17 +0200 Subject: [PATCH] Fix Issue #2441 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;