Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-31 04:35:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-31 04:35:40 +0300
commit5afc247ea183488f6b5cd22f659a21e87a68ddbb (patch)
treed091cf80f14c39ee56ff28d8369d23ed0fe0e624 /source/blender
parent8c89790674901748cf04771dc2c5453815db1607 (diff)
Fix image paint undo memory leak
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_undo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_undo.c b/source/blender/editors/sculpt_paint/paint_image_undo.c
index 25f5d91a928..0cf56726abf 100644
--- a/source/blender/editors/sculpt_paint/paint_image_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_image_undo.c
@@ -346,10 +346,10 @@ static void image_undo_restore_list(ListBase *lb, struct UndoIDPtrMap *id_map)
static void image_undo_free_list(ListBase *lb)
{
- UndoImageTile *tile;
-
- for (tile = lb->first; tile; tile = tile->next) {
+ for (UndoImageTile *tile = lb->first, *tile_next; tile; tile = tile_next) {
+ tile_next = tile->next;
MEM_freeN(tile->rect.pt);
+ MEM_freeN(tile);
}
}