goobox r350 - in trunk: . src



Author: paobac
Date: Tue Apr 22 10:18:03 2008
New Revision: 350
URL: http://svn.gnome.org/viewvc/goobox?rev=350&view=rev

Log:
2008-04-22  Paolo Bacchilega  <paobac svn gnome org>

	* src/track-info.c: 
	* src/goo-window.c: 
	* src/goo-player-info.c: 
	* src/gconf-utils.c: 
	* src/dlg-cover-chooser.c: 
	* src/album-info.c: 
	
	Fixed bug #478435 â several memory leaks.  Patch by Felix Riemann.

Modified:
   trunk/ChangeLog
   trunk/src/album-info.c
   trunk/src/dlg-cover-chooser.c
   trunk/src/gconf-utils.c
   trunk/src/goo-player-info.c
   trunk/src/goo-window.c
   trunk/src/track-info.c

Modified: trunk/src/album-info.c
==============================================================================
--- trunk/src/album-info.c	(original)
+++ trunk/src/album-info.c	Tue Apr 22 10:18:03 2008
@@ -51,12 +51,14 @@
 static void
 album_info_free (AlbumInfo *album)
 {
+	g_free (album->id);
 	g_free (album->title);
 	g_free (album->artist);
 	g_free (album->artist_id);
 	g_free (album->genre);
 	g_free (album->asin);
 	g_date_free (album->release_date);
+	track_list_free (album->tracks);
 	g_free (album);
 }
 

Modified: trunk/src/dlg-cover-chooser.c
==============================================================================
--- trunk/src/dlg-cover-chooser.c	(original)
+++ trunk/src/dlg-cover-chooser.c	Tue Apr 22 10:18:03 2008
@@ -764,7 +764,9 @@
 		dest = g_build_filename (data->tmpdir, filename, NULL);
 		g_free (filename);
 
-		copy_file_from_url (data, url, dest, auto_fetch__image_saved_cb);
+		copy_file_from_url (data, url, dest, auto_fetch__image_saved_cb)
+;
+		g_free (dest);
 	} 
 	else
 		destroy_cb (NULL, data);
@@ -806,7 +808,7 @@
 	data->max_images = 1;
 	data->autofetching = TRUE;
 
-	data->tmpdir = g_strdup (get_temp_work_dir ());
+	data->tmpdir = get_temp_work_dir ();
 	ensure_dir_exists (data->tmpdir, DIR_PERM);
 
 	data->load_id = g_idle_add (auto_fetch_from_name__start_searching, data);

Modified: trunk/src/gconf-utils.c
==============================================================================
--- trunk/src/gconf-utils.c	(original)
+++ trunk/src/gconf-utils.c	Tue Apr 22 10:18:03 2008
@@ -319,6 +319,7 @@
 		g_return_val_if_fail (error == NULL, result);
 		g_free (result);
 		result = g_strdup (val);
+		g_free (val);
 
 	} else if (error != NULL)
 		eel_gconf_handle_error (&error);

Modified: trunk/src/goo-player-info.c
==============================================================================
--- trunk/src/goo-player-info.c	(original)
+++ trunk/src/goo-player-info.c	Tue Apr 22 10:18:03 2008
@@ -917,6 +917,7 @@
 			gtk_notebook_set_current_page (GTK_NOTEBOOK (info->priv->notebook), 1);
 			gtk_image_set_from_pixbuf (GTK_IMAGE (info->priv->cover_image), image);
 			cover_set = TRUE;
+			g_object_unref (image);
 		}
 		else 
 			goo_player_info_set_cover (info, "audio-cd");

Modified: trunk/src/goo-window.c
==============================================================================
--- trunk/src/goo-window.c	(original)
+++ trunk/src/goo-window.c	Tue Apr 22 10:18:03 2008
@@ -510,6 +510,7 @@
 			track_info_ref (new_track);
 			priv->current_track = new_track;
 		}
+		track_info_unref (new_track);
 
 	} while (gtk_tree_model_iter_next (model, &iter));
 }
@@ -1445,7 +1446,7 @@
 	else if (state == GOO_PLAYER_STATE_ERROR) {
 		GError *error = goo_player_get_error (priv->player);
 		
-		g_string_append (title, g_strdup (error->message));
+		g_string_append (title, error->message);
 		g_error_free (error);
 	} 
 	else if (state == GOO_PLAYER_STATE_NO_DISC) {
@@ -1566,6 +1567,7 @@
 	else
 		g_error_free (error);
 
+	g_free (buffer);
 	gnome_vfs_close (handle);
 }
 
@@ -1659,7 +1661,7 @@
 		g_free (filename);
 		return;
 	}
-
+	g_free (filename);
 	if (window->priv->album->asin != NULL) 
 		fetch_cover_image_from_asin (window, window->priv->album->asin);
 	else if ((window->priv->album->title != NULL) && (window->priv->album->artist != NULL))

Modified: trunk/src/track-info.c
==============================================================================
--- trunk/src/track-info.c	(original)
+++ trunk/src/track-info.c	Tue Apr 22 10:18:03 2008
@@ -64,6 +64,7 @@
 {
 	g_free (track->title);
 	g_free (track->artist);
+	g_free (track->artist_id);
 	g_free (track);
 }
 



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