[gthumb/ext] fixed minor memory leaks



commit d8c57640d8fb5e04d3a01ce709f22729dc4f185b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Sep 9 10:33:26 2009 +0200

    fixed minor memory leaks

 gthumb/glib-utils.c                  |    3 +++
 gthumb/gth-cell-renderer-thumbnail.c |    2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/glib-utils.c b/gthumb/glib-utils.c
index 0f6e01e..979f754 100644
--- a/gthumb/glib-utils.c
+++ b/gthumb/glib-utils.c
@@ -173,6 +173,7 @@ idle_call_exec (IdleCall *call,
 					(GDestroyNotify) idle_call_free);
 	else {
 		(*call->func) (call->data);
+		idle_call_free (call);
 		return 0;
 	}
 }
@@ -684,6 +685,8 @@ _g_replace (const char *str,
 			gstr = g_string_append (gstr, to_str);
 	}
 
+	g_strfreev (tokens);
+
 	return g_string_free (gstr, FALSE);
 }
 
diff --git a/gthumb/gth-cell-renderer-thumbnail.c b/gthumb/gth-cell-renderer-thumbnail.c
index cdbecfc..6ba673d 100644
--- a/gthumb/gth-cell-renderer-thumbnail.c
+++ b/gthumb/gth-cell-renderer-thumbnail.c
@@ -274,7 +274,6 @@ gth_cell_renderer_thumbnail_render (GtkCellRenderer      *cell,
 	GdkRectangle              draw_rect;
 	GdkRectangle              image_rect;
 	cairo_t                  *cr;
-	cairo_path_t             *cr_path;
 	GdkPixbuf                *pixbuf;
 	GdkPixbuf                *colorized = NULL;
 	int                       B;
@@ -333,7 +332,6 @@ gth_cell_renderer_thumbnail_render (GtkCellRenderer      *cell,
 		cairo_rel_line_to (cr, - (thumb_rect.width - (R * 2)), 0);
 		cairo_arc (cr, thumb_rect.x + R, thumb_rect.y + thumb_rect.height - R, R, 0.5 * M_PI, 1.0 * M_PI);
 		cairo_close_path (cr);
-		cr_path = cairo_copy_path (cr);
 		cairo_fill (cr);
 	}
 



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