Mercurial > audlegacy
comparison libaudacious/titlestring.c @ 1350:ca5d03c4b3f1 trunk
[svn] - extra sanity checking keeps the double-free away
author | nenolod |
---|---|
date | Wed, 28 Jun 2006 13:16:32 -0700 |
parents | 6636d328fa38 |
children | f12d7e208b43 |
comparison
equal
deleted
inserted
replaced
1349:5c5fe5bbd561 | 1350:ca5d03c4b3f1 |
---|---|
51 } | 51 } |
52 | 52 |
53 void | 53 void |
54 bmp_title_input_free(BmpTitleInput * input) | 54 bmp_title_input_free(BmpTitleInput * input) |
55 { | 55 { |
56 if (!input) | 56 if (input == NULL) |
57 return; | 57 return; |
58 | 58 |
59 g_free(input->performer); | 59 if (input->performer != NULL) |
60 g_free(input->album_name); | 60 g_free(input->performer); |
61 g_free(input->track_name); | 61 |
62 g_free(input->date); | 62 if (input->album_name != NULL) |
63 g_free(input->genre); | 63 g_free(input->album_name); |
64 g_free(input->comment); | 64 |
65 g_free(input->file_name); | 65 if (input->track_name != NULL) |
66 g_free(input->file_path); | 66 g_free(input->track_name); |
67 | |
68 if (input->date != NULL) | |
69 g_free(input->date); | |
70 | |
71 if (input->genre != NULL) | |
72 g_free(input->genre); | |
73 | |
74 if (input->comment != NULL) | |
75 g_free(input->comment); | |
76 | |
77 if (input->file_name != NULL) | |
78 g_free(input->file_name); | |
79 | |
80 if (input->file_path != NULL) | |
81 g_free(input->file_path); | |
82 | |
67 g_free(input); | 83 g_free(input); |
68 } | 84 } |
69 | 85 |
70 gchar * | 86 gchar * |
71 xmms_get_titlestring(const gchar * fmt, TitleInput * input) | 87 xmms_get_titlestring(const gchar * fmt, TitleInput * input) |