summaryrefslogtreecommitdiff
path: root/plugins/aac
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-11 22:46:15 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-11 22:46:15 +0100
commitc03f9d198049b09a0dd944da7a581f1836b07947 (patch)
treee4f7b6f2a9c7c512cfcba9d7af1afefdf3335a03 /plugins/aac
parent88d7e5b0b071c6c60f15c6b606dabdc186d2ec5e (diff)
aac: fixed mp4ff memleak when a file has chapters or cuesheet
Diffstat (limited to 'plugins/aac')
-rw-r--r--plugins/aac/aac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/aac/aac.c b/plugins/aac/aac.c
index 60479504..9d97fe8a 100644
--- a/plugins/aac/aac.c
+++ b/plugins/aac/aac.c
@@ -1172,6 +1172,8 @@ aac_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) {
}
free (chapters);
if (cue) {
+ deadbeef->fclose (fp);
+ mp4ff_close (mp4);
deadbeef->pl_item_unref (it);
deadbeef->pl_item_unref (cue);
deadbeef->pl_unlock ();
@@ -1186,6 +1188,8 @@ aac_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) {
if (cuesheet) {
cue = deadbeef->plt_insert_cue_from_buffer (plt, after, it, cuesheet, strlen (cuesheet), totalsamples, samplerate);
if (cue) {
+ deadbeef->fclose (fp);
+ mp4ff_close (mp4);
deadbeef->pl_item_unref (it);
deadbeef->pl_item_unref (cue);
deadbeef->pl_unlock ();