Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Coudoin <bcoudoin@src.gnome.org>2006-10-12 19:37:19 (GMT)
committer Bruno Coudoin <bcoudoin@src.gnome.org>2006-10-12 19:37:19 (GMT)
commit12908e8b9eebfd2ec90fc74fa0ac514c89a743da (patch)
tree080975faf3462bbab37cbb4c00d6ee9c1e0b9b06
parentde2da9148df7f398db60bab8a2ff40a0c1c1e304 (diff)
Fixed a memleak by Miguel DE IZARRA
* src/gcompris/gameutil.c: (gc_item_focus_set): Fixed a memleak by Miguel DE IZARRA
-rw-r--r--ChangeLog10
-rw-r--r--src/gcompris/gameutil.c2
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 97fec20..437dc5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-10-12 Bruno coudoin <bruno.coudoin@free.fr>
+
+ * src/gcompris/gameutil.c: (gc_item_focus_set): Fixed a memleak by Miguel DE IZARRA
+
+2006-10-10 Bruno coudoin <bruno.coudoin@free.fr>
+
+ reviewed by: <delete if not using a buddy>
+
+ * src/gcompris/gameutil.c: (gc_item_focus_set):
+
2006-10-10 Bruno coudoin <bruno.coudoin@free.fr>
- José JORGE created a new set of icons that were missing for the memory
diff --git a/src/gcompris/gameutil.c b/src/gcompris/gameutil.c
index dad25de..3254d10 100644
--- a/src/gcompris/gameutil.c
+++ b/src/gcompris/gameutil.c
@@ -180,6 +180,7 @@ void gc_item_focus_set(GnomeCanvasItem *item, gboolean focus)
gtk_object_get (GTK_OBJECT (item), "pixbuf", &pixbuf, NULL);
g_return_if_fail (pixbuf != NULL);
+ gdk_pixbuf_unref(pixbuf);
/* Store the first pixbuf */
pixbuf_ref = (GdkPixbuf *)g_object_get_data (G_OBJECT (item), "pixbuf_ref");
@@ -187,6 +188,7 @@ void gc_item_focus_set(GnomeCanvasItem *item, gboolean focus)
{
g_object_set_data (G_OBJECT (item), "pixbuf_ref", pixbuf);
pixbuf_ref = pixbuf;
+ gdk_pixbuf_ref(pixbuf);
g_signal_connect (item, "destroy",
G_CALLBACK (free_image_focus),
NULL);