[gimp/soc-2010-cage-2] gimpcagetool: fix buffer leak



commit 19b81bb097732981341191ad9d4829e632029a6c
Author: Michael Muré <batolettre gmail com>
Date:   Sun Aug 8 18:21:26 2010 +0200

    gimpcagetool: fix buffer leak

 app/tools/gimpcagetool.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpcagetool.c b/app/tools/gimpcagetool.c
index 14377da..5e9a81e 100644
--- a/app/tools/gimpcagetool.c
+++ b/app/tools/gimpcagetool.c
@@ -215,6 +215,9 @@ gimp_cage_tool_halt (GimpCageTool *ct)
   ct->cursor_position.y = 0;
   ct->handle_moved = -1;
   ct->cage_complete = FALSE;
+  
+  gegl_buffer_destroy (ct->coef);
+  ct->coef = NULL;
 }
 
 static void 
@@ -604,7 +607,7 @@ gimp_cage_tool_process (GimpCageTool *ct,
                               "tile-manager", gimp_drawable_get_tiles (drawable),
                               "linear",       TRUE,
                               NULL);
-                                
+
     cage = gegl_node_new_child (gegl,
                                   "operation", "gegl:cage_transform",
                                   "config", ct->config,
@@ -625,7 +628,7 @@ gimp_cage_tool_process (GimpCageTool *ct,
     gegl_node_connect_to (cage, "output",
                           render, "aux");
     
-                                
+
 /*    render = gegl_node_new_child (gegl,
                                   "operation", "gegl:debugit",
                                   NULL);*/
@@ -669,3 +672,5 @@ gimp_cage_tool_process (GimpCageTool *ct,
     gimp_cage_tool_halt (ct);
   }
 }
+
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]