[brasero] Fix a memory leak due to recent changes



commit b6d5658921c7f3028588556ec18702ae1233f555
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Wed Jul 22 15:17:37 2009 +0200

    Fix a memory leak due to recent changes

 libbrasero-burn/brasero-track-data-cfg.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libbrasero-burn/brasero-track-data-cfg.c b/libbrasero-burn/brasero-track-data-cfg.c
index 56ee439..6ed27bc 100644
--- a/libbrasero-burn/brasero-track-data-cfg.c
+++ b/libbrasero-burn/brasero-track-data-cfg.c
@@ -2598,7 +2598,8 @@ brasero_track_data_cfg_name_collision_cb (BraseroDataProject *project,
 
 		return FALSE;
 	}
-	else if (node == priv->icon) {
+
+	if (node == priv->icon) {
 		gchar *uri;
 		gchar *name = NULL;
 		BraseroFileNode *root;
@@ -3043,6 +3044,11 @@ brasero_track_data_cfg_set_icon (BraseroTrackDataCfg *track,
 		brasero_track_data_cfg_autorun_inf_update (track);
 	}
 
+	if (priv->image_file) {
+		g_object_unref (priv->image_file);
+		priv->image_file = NULL;
+	}
+
 	priv->image_file = g_file_new_for_path (icon_path);
 	g_signal_emit (track,
 		       brasero_track_data_cfg_signals [ICON_CHANGED],



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