Don't leak pixbuf in some cases. (#317611, Tommi Komulainen)

2005-09-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimage.c (gtk_image_expose): Don't leak pixbuf in
	some cases.  (#317611, Tommi Komulainen)
This commit is contained in:
Matthias Clasen 2005-09-30 15:40:55 +00:00 committed by Matthias Clasen
parent 51c6eb961e
commit 0d047a359d
3 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2005-09-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimage.c (gtk_image_expose): Don't leak pixbuf in
some cases. (#317611, Tommi Komulainen)
* gtk/gtksocket-x11.c (_gtk_socket_windowing_size_request):
Prevent overflow when storing size hints in an unsigned
short variable. Tracked down by Ray Strode and Søren Sandmann.

View File

@ -1,5 +1,8 @@
2005-09-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimage.c (gtk_image_expose): Don't leak pixbuf in
some cases. (#317611, Tommi Komulainen)
* gtk/gtksocket-x11.c (_gtk_socket_windowing_size_request):
Prevent overflow when storing size hints in an unsigned
short variable. Tracked down by Ray Strode and Søren Sandmann.

View File

@ -1784,9 +1784,6 @@ gtk_image_expose (GtkWidget *widget,
image_bound.height,
GDK_RGB_DITHER_NORMAL,
0, 0);
g_object_unref (pixbuf);
pixbuf = NULL;
}
}
else
@ -1829,6 +1826,9 @@ gtk_image_expose (GtkWidget *widget,
gdk_gc_set_clip_origin (widget->style->black_gc, 0, 0);
}
if (pixbuf)
g_object_unref (pixbuf);
} /* if widget is drawable */
return FALSE;