From: James B. <bur...@go...> - 2011-06-30 08:29:28
|
Hi, I hope this is the correct list for libgpod discussion. 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. Thanks, James Burton 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); } |