Mercurial > audlegacy-plugins
comparison src/madplug/input.c @ 2512:1f6b5f5768e2
Remove some completely useless null-pointer checks, g_free() checks the pointer anyway.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 02 Apr 2008 22:58:35 +0300 |
parents | 809736eb47d9 |
children | a4629703edc3 |
comparison
equal
deleted
inserted
replaced
2508:58889ccbe807 | 2512:1f6b5f5768e2 |
---|---|
585 gboolean | 585 gboolean |
586 input_term(struct mad_info_t * info) | 586 input_term(struct mad_info_t * info) |
587 { | 587 { |
588 AUDDBG("f: input_term\n"); | 588 AUDDBG("f: input_term\n"); |
589 | 589 |
590 if (info->title) | 590 g_free(info->title); |
591 g_free(info->title); | 591 g_free(info->url); |
592 if (info->url) | 592 g_free(info->filename); |
593 g_free(info->url); | |
594 if (info->filename) | |
595 g_free(info->filename); | |
596 if (info->infile) | 593 if (info->infile) |
597 aud_vfs_fclose(info->infile); | 594 aud_vfs_fclose(info->infile); |
598 if (info->id3file) | 595 if (info->id3file) |
599 id3_file_close(info->id3file); | 596 id3_file_close(info->id3file); |
600 | 597 |
601 if (info->replaygain_album_str) | 598 g_free(info->replaygain_album_str); |
602 g_free(info->replaygain_album_str); | 599 g_free(info->replaygain_track_str); |
603 if (info->replaygain_track_str) | 600 g_free(info->replaygain_album_peak_str); |
604 g_free(info->replaygain_track_str); | 601 g_free(info->replaygain_track_peak_str); |
605 if (info->replaygain_album_peak_str) | 602 g_free(info->mp3gain_undo_str); |
606 g_free(info->replaygain_album_peak_str); | 603 g_free(info->mp3gain_minmax_str); |
607 if (info->replaygain_track_peak_str) | |
608 g_free(info->replaygain_track_peak_str); | |
609 if (info->mp3gain_undo_str) | |
610 g_free(info->mp3gain_undo_str); | |
611 if (info->mp3gain_minmax_str) | |
612 g_free(info->mp3gain_minmax_str); | |
613 | 604 |
614 if (info->tuple) { | 605 if (info->tuple) { |
615 aud_tuple_free(info->tuple); | 606 aud_tuple_free(info->tuple); |
616 info->tuple = NULL; | 607 info->tuple = NULL; |
617 } | 608 } |
618 | 609 |
619 if (info->prev_title) | 610 g_free(info->prev_title); |
620 g_free(info->prev_title); | |
621 | 611 |
622 /* set everything to zero in case it gets used again. */ | 612 /* set everything to zero in case it gets used again. */ |
623 memset(info, 0, sizeof(struct mad_info_t)); | 613 memset(info, 0, sizeof(struct mad_info_t)); |
624 | 614 |
625 AUDDBG("e: input_term\n"); | 615 AUDDBG("e: input_term\n"); |