[brasero] Fix memory leak when loading saved data project



commit 25a6e4dc18d663af0098c59fd410b9802c7b5e96
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Tue Sep 29 22:02:58 2009 +0200

    Fix memory leak when loading saved data project

 libbrasero-burn/brasero-track-data-cfg.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-burn/brasero-track-data-cfg.c b/libbrasero-burn/brasero-track-data-cfg.c
index 8601b34..7abcdad 100644
--- a/libbrasero-burn/brasero-track-data-cfg.c
+++ b/libbrasero-burn/brasero-track-data-cfg.c
@@ -2241,6 +2241,14 @@ brasero_track_data_cfg_set_source (BraseroTrackData *track,
 							    grafts,
 							    excluded);
 
+	/* Remember that we own the list grafts and excluded
+	 * so we have to free them ourselves. */
+	g_slist_foreach (grafts, (GFunc) brasero_graft_point_free, NULL);
+	g_slist_free (grafts);
+
+	g_slist_foreach (excluded, (GFunc) g_free, NULL);
+	g_slist_free (excluded);
+
 	if (!priv->loading)
 		return BRASERO_BURN_OK;
 



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