diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2011-08-01 14:00:56 +0200 |
---|---|---|
committer | Ross Burton <ross@linux.intel.com> | 2011-10-31 14:36:23 +0000 |
commit | a8757db43d062cb48afcdc25c14075f20b8078f8 (patch) | |
tree | 34b4761d34e8ca9b68523056fda7278e40acd18e | |
parent | bcef8ec26548a0318d073e800c93c23f1dc70b7e (diff) |
fix leaks in update_ui_for_album
-rw-r--r-- | src/sj-main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sj-main.c b/src/sj-main.c index ded7300..94fbeb5 100644 --- a/src/sj-main.c +++ b/src/sj-main.c @@ -494,10 +494,14 @@ static void update_ui_for_album (AlbumDetails *album) gtk_entry_set_text (GTK_ENTRY (title_entry), album->title); gtk_entry_set_text (GTK_ENTRY (artist_entry), album->artist); if (album->disc_number) { - gtk_entry_set_text (GTK_ENTRY (disc_number_entry), g_strdup_printf ("%d", album->disc_number)); + gchar *disc_number = g_strdup_printf ("%d", album->disc_number); + gtk_entry_set_text (GTK_ENTRY (disc_number_entry), disc_number); + g_free (disc_number); } if (album->release_date && g_date_valid (album->release_date)) { - gtk_entry_set_text (GTK_ENTRY (year_entry), g_strdup_printf ("%d", g_date_get_year (album->release_date))); + gchar *release_date = g_strdup_printf ("%d", g_date_get_year (album->release_date)); + gtk_entry_set_text (GTK_ENTRY (year_entry), release_date); + g_free (release_date); } g_signal_handlers_unblock_by_func (title_entry, on_title_edit_changed, NULL); g_signal_handlers_unblock_by_func (artist_entry, on_artist_edit_changed, NULL); |