[Bf-blender-cvs] [662ba67210b] blender-v3.3-release: GPencil: Fix unreported memory leak in Fill inverse

Antonio Vazquez noreply at git.blender.org
Fri Sep 30 15:08:18 CEST 2022


Commit: 662ba67210b43af9384ce6eb1d8f9f3e25d1dcd9
Author: Antonio Vazquez
Date:   Wed Sep 28 19:36:15 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB662ba67210b43af9384ce6eb1d8f9f3e25d1dcd9

GPencil: Fix unreported memory leak in Fill inverse

There was a memory leak when use inverted fill.

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

M	source/blender/editors/gpencil/gpencil_fill.c

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

diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 5305c764b3a..bc6fa28629f 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -2071,9 +2071,12 @@ static bool gpencil_find_and_mark_empty_areas(tGPDfill *tgpf)
     get_pixel(ibuf, i, rgba);
     if (rgba[3] == 0.0f) {
       set_pixel(ibuf, i, blue_col);
+      BKE_image_release_ibuf(tgpf->ima, ibuf, NULL);
       return true;
     }
   }
+
+  BKE_image_release_ibuf(tgpf->ima, ibuf, NULL);
   return false;
 }



More information about the Bf-blender-cvs mailing list