[brasero] Fix memleak on BraseroTrackData finalization



commit ef72949bd702538996399cdaba400d1899434caf
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Mon Jul 20 15:26:02 2009 +0200

    Fix memleak on BraseroTrackData finalization

 libbrasero-burn/brasero-track-data.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-burn/brasero-track-data.c b/libbrasero-burn/brasero-track-data.c
index 9b619ff..2e4ccf0 100644
--- a/libbrasero-burn/brasero-track-data.c
+++ b/libbrasero-burn/brasero-track-data.c
@@ -413,6 +413,21 @@ brasero_track_data_init (BraseroTrackData *object)
 static void
 brasero_track_data_finalize (GObject *object)
 {
+	BraseroTrackDataPrivate *priv;
+
+	priv = BRASERO_TRACK_DATA_PRIVATE (object);
+	if (priv->grafts) {
+		g_slist_foreach (priv->grafts, (GFunc) brasero_graft_point_free, NULL);
+		g_slist_free (priv->grafts);
+		priv->grafts = NULL;
+	}
+
+	if (priv->excluded) {
+		g_slist_foreach (priv->excluded, (GFunc) g_free, NULL);
+		g_slist_free (priv->excluded);
+		priv->excluded = NULL;
+	}
+
 	G_OBJECT_CLASS (brasero_track_data_parent_class)->finalize (object);
 }
 



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