[Bf-blender-cvs] [9e23ab9f37f] master: Fix: Memory leak in realtime compositor

Omar Emara noreply at git.blender.org
Mon Aug 22 10:59:39 CEST 2022


Commit: 9e23ab9f37f913f6f1bc197de76bac35c6f7816d
Author: Omar Emara
Date:   Mon Aug 22 10:57:24 2022 +0200
Branches: master
https://developer.blender.org/rB9e23ab9f37f913f6f1bc197de76bac35c6f7816d

Fix: Memory leak in realtime compositor

There was a memory leak in the GPU code generator for the compositor
output. It was just due to a missing free in the GPU code generator
destructor, so this patch makes sure it is freed.

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

M	source/blender/gpu/intern/gpu_codegen.cc

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

diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc
index 4a45a3e63ed..2e1cb6b4a22 100644
--- a/source/blender/gpu/intern/gpu_codegen.cc
+++ b/source/blender/gpu/intern/gpu_codegen.cc
@@ -259,6 +259,7 @@ class GPUCodegen {
     MEM_SAFE_FREE(output.volume);
     MEM_SAFE_FREE(output.thickness);
     MEM_SAFE_FREE(output.displacement);
+    MEM_SAFE_FREE(output.composite);
     MEM_SAFE_FREE(output.material_functions);
     delete create_info;
     BLI_freelistN(&ubo_inputs_);



More information about the Bf-blender-cvs mailing list