From 17d5030d5918dcf4c7275159f571b73cdefbd0ba Mon Sep 17 00:00:00 2001 From: Guillaume Chereau Date: Mon, 8 Jul 2024 22:15:24 +0800 Subject: [PATCH] Fix memory leak on glTF export Forgot to free the vertex buffer. --- src/volume_to_vertices.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/volume_to_vertices.c b/src/volume_to_vertices.c index 255572ace..e458d8487 100644 --- a/src/volume_to_vertices.c +++ b/src/volume_to_vertices.c @@ -439,6 +439,7 @@ volume_mesh_t *volume_generate_mesh( if (nb == 0) continue; fill_mesh(mesh, verts, nb, size, subdivide, bpos, palette); } + free(verts); optimize_mesh(mesh, simplify);