diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-10-04 22:49:49 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-10-04 22:49:49 +0200 |
commit | a091698bf50f49c10e5537282b98fb33d22e07dc (patch) | |
tree | 22c697b076e259839dcb4193a072da6c7e6128e8 /plugins/aac/aac.c | |
parent | 43beeb7291d4c3290bc87f6aa55941dbfcd2d2bd (diff) |
fixed few random memleaks
Diffstat (limited to 'plugins/aac/aac.c')
-rw-r--r-- | plugins/aac/aac.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c index 219087b3..2f6b518b 100644 --- a/plugins/aac/aac.c +++ b/plugins/aac/aac.c @@ -899,7 +899,7 @@ int32_t mp4ff_meta_find_by_name(const mp4ff_t *f, const char *item, char **value void aac_load_tags (DB_playItem_t *it, mp4ff_t *mp4) { - char *s; + char *s = NULL; for (int i = 0; metainfo[i]; i += 2) { if (mp4ff_meta_find_by_name(mp4, metainfo[i], &s)) { deadbeef->pl_add_meta (it, metainfo[i+1], s); @@ -912,15 +912,19 @@ aac_load_tags (DB_playItem_t *it, mp4ff_t *mp4) { it->replaygain_album_peak = 1; if (mp4ff_meta_find_by_name(mp4, "replaygain_track_gain", &s)) { it->replaygain_track_gain = atof (s); + free (s); } if (mp4ff_meta_find_by_name(mp4, "replaygain_track_peak", &s)) { it->replaygain_track_peak = atof (s); + free (s); } if (mp4ff_meta_find_by_name(mp4, "replaygain_album_gain", &s)) { it->replaygain_album_gain = atof (s); + free (s); } if (mp4ff_meta_find_by_name(mp4, "replaygain_album_peak", &s)) { it->replaygain_album_peak = atof (s); + free (s); } deadbeef->pl_add_meta (it, "title", NULL); } |