[Bf-blender-cvs] [86309bd7f89] modifier-panels-ui: Fix Memory Leak in Shader Interface

Jeroen Bakker noreply at git.blender.org
Thu Apr 16 21:30:30 CEST 2020


Commit: 86309bd7f89680c170ca2f4e635515785fcc4669
Author: Jeroen Bakker
Date:   Thu Apr 16 16:55:46 2020 +0200
Branches: modifier-panels-ui
https://developer.blender.org/rB86309bd7f89680c170ca2f4e635515785fcc4669

Fix Memory Leak in Shader Interface

===================================================================

M	source/blender/gpu/intern/gpu_shader_interface.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_shader_interface.c b/source/blender/gpu/intern/gpu_shader_interface.c
index db8ec60fa9a..1caa88d18ae 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.c
+++ b/source/blender/gpu/intern/gpu_shader_interface.c
@@ -257,6 +257,7 @@ GPUShaderInterface *GPU_shaderinterface_create(int32_t program)
     input->location = glGetAttribLocation(program, name);
     /* Ignore OpenGL names like `gl_BaseInstanceARB`, `gl_InstanceID` and `gl_VertexID`. */
     if (input->location == -1) {
+      MEM_freeN(input);
       continue;
     }



More information about the Bf-blender-cvs mailing list