[brasero/gnome-2-30] Fix memleak



commit 08df92d477fd520626dd53032cddc78680e77638
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Tue May 11 22:54:46 2010 +0200

    Fix memleak

 libbrasero-utils/brasero-jacket-buffer.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libbrasero-utils/brasero-jacket-buffer.c b/libbrasero-utils/brasero-jacket-buffer.c
index 3a3b961..828ccf1 100644
--- a/libbrasero-utils/brasero-jacket-buffer.c
+++ b/libbrasero-utils/brasero-jacket-buffer.c
@@ -342,7 +342,6 @@ brasero_jacket_buffer_cursor_position_changed_cb (GObject *buffer,
 
 	g_slist_foreach (priv->tags, (GFunc) g_object_unref, NULL);
 	g_slist_free (priv->tags);
-	priv->tags = NULL;
  
 	priv->tags = gtk_text_iter_get_tags (&iter);
 	g_slist_foreach (priv->tags, (GFunc) g_object_ref, NULL);
@@ -488,6 +487,11 @@ brasero_jacket_buffer_finalize (GObject *object)
 		priv->default_text = NULL;
 	}
 
+	if (priv->tags) {
+		g_slist_foreach (priv->tags, (GFunc) g_object_unref, NULL);
+		g_slist_free (priv->tags);
+	}
+
 	G_OBJECT_CLASS (brasero_jacket_buffer_parent_class)->finalize (object);
 }
 



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