From: Christophe F. <te...@us...> - 2011-07-07 20:04:39
|
commit 56c5f98929fde24e31283059faa769e85c057b6e Author: James Burton <bur...@go...> Date: Sun Jul 3 18:31:58 2011 +0200 fix itdb_free crash I've seen a few libgpod crashes in itdb_free() which appear to be due to a double free of itdb->priv->genius_cuid. Also I assume the check before the first g_free() can be removed since g_free does nothing if passed NULL. src/itdb_itunesdb.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) --- diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index 446e43f..8e47c26 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -1355,8 +1355,7 @@ void itdb_free (Itdb_iTunesDB *itdb) (GFunc)(itdb_playlist_free), NULL); } - if (itdb->priv->genius_cuid) - g_free(itdb->priv->genius_cuid); + g_free(itdb->priv->genius_cuid); } g_list_free (itdb->playlists); @@ -1367,7 +1366,6 @@ void itdb_free (Itdb_iTunesDB *itdb) itdb_device_free (itdb->device); if (itdb->userdata && itdb->userdata_destroy) (*itdb->userdata_destroy) (itdb->userdata); - g_free (itdb->priv->genius_cuid); g_free (itdb->priv); g_free (itdb); } |