Fix leaks Same Closes bug #308953.

2005-06-27  Kjartan Maraas  <kmaraas@gnome.org>

	* gtk/gtkhruler.c: (gtk_hruler_draw_ticks): Fix leaks
	* gtk/gtkvruler.c: (gtk_vruler_draw_ticks): Same
	Closes bug #308953.
This commit is contained in:
Kjartan Maraas 2005-06-27 14:38:19 +00:00 committed by Kjartan Maraas
parent d4c43a42ad
commit 8eb4666ffe
5 changed files with 24 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-06-27 Kjartan Maraas <kmaraas@gnome.org>
* gtk/gtkhruler.c: (gtk_hruler_draw_ticks): Fix leaks
* gtk/gtkvruler.c: (gtk_vruler_draw_ticks): Same
Closes bug #308953.
2005-06-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path): Use

View File

@ -1,3 +1,9 @@
2005-06-27 Kjartan Maraas <kmaraas@gnome.org>
* gtk/gtkhruler.c: (gtk_hruler_draw_ticks): Fix leaks
* gtk/gtkvruler.c: (gtk_vruler_draw_ticks): Same
Closes bug #308953.
2005-06-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path): Use

View File

@ -1,3 +1,9 @@
2005-06-27 Kjartan Maraas <kmaraas@gnome.org>
* gtk/gtkhruler.c: (gtk_hruler_draw_ticks): Fix leaks
* gtk/gtkvruler.c: (gtk_vruler_draw_ticks): Same
Closes bug #308953.
2005-06-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path): Use

View File

@ -190,7 +190,8 @@ gtk_hruler_draw_ticks (GtkRuler *ruler)
lower = ruler->lower / ruler->metric->pixels_per_unit;
if ((upper - lower) == 0)
return;
goto out;
increment = (gdouble) width / (upper - lower);
/* determine the scale
@ -267,6 +268,7 @@ gtk_hruler_draw_ticks (GtkRuler *ruler)
}
cairo_fill (cr);
out:
cairo_destroy (cr);
g_object_unref (layout);

View File

@ -191,7 +191,8 @@ gtk_vruler_draw_ticks (GtkRuler *ruler)
lower = ruler->lower / ruler->metric->pixels_per_unit;
if ((upper - lower) == 0)
return;
goto out;
increment = (gdouble) width / (upper - lower);
/* determine the scale
@ -273,6 +274,7 @@ gtk_vruler_draw_ticks (GtkRuler *ruler)
}
cairo_fill (cr);
out:
cairo_destroy (cr);
g_object_unref (layout);