diff options
Diffstat (limited to 'src/input/input_cdda.c')
-rw-r--r-- | src/input/input_cdda.c | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 83f89b08f..9cb762dbc 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -383,10 +383,10 @@ static cdrom_toc * init_cdrom_toc(void) { static void free_cdrom_toc(cdrom_toc *toc) { - if(toc && toc->toc_entries) + if ( toc ) { free(toc->toc_entries); - if (toc) - free (toc); + free(toc); + } } #if defined (__linux__) @@ -1985,26 +1985,15 @@ static void _cdda_free_cddb_info(cdda_input_plugin_t *this) { int t; for(t = 0; t < this->cddb.num_tracks; t++) { - if(this->cddb.track[t].title) - free(this->cddb.track[t].title); + free(this->cddb.track[t].title); } free(this->cddb.track); - - if(this->cddb.cdiscid) - free(this->cddb.cdiscid); - - if(this->cddb.disc_title) - free(this->cddb.disc_title); - - if(this->cddb.disc_artist) - free(this->cddb.disc_artist); - - if(this->cddb.disc_category) - free(this->cddb.disc_category); - - if(this->cddb.disc_year) - free(this->cddb.disc_year); + free(this->cddb.cdiscid); + free(this->cddb.disc_title); + free(this->cddb.disc_artist); + free(this->cddb.disc_category); + free(this->cddb.disc_year); } } @@ -2354,8 +2343,7 @@ static void cdda_plugin_dispose (input_plugin_t *this_gen ) { free(this->mrl); - if (this->cdda_device) - free(this->cdda_device); + free(this->cdda_device); if (this->class) { cdda_input_class_t *inp = (cdda_input_class_t *) this->class; inp->ip = NULL; |