[Bf-blender-cvs] [db600fd6399] master: Fix Memory Leak in Shader Interface

Jeroen Bakker noreply at git.blender.org
Thu Apr 16 16:56:15 CEST 2020


Commit: db600fd63998b81022f01e0b1b6b71c9cd359130
Author: Jeroen Bakker
Date:   Thu Apr 16 16:55:46 2020 +0200
Branches: master
https://developer.blender.org/rBdb600fd63998b81022f01e0b1b6b71c9cd359130

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