aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-03-06 13:12:39 +0100
committerMax Kellermann <max@duempel.org>2014-03-06 13:12:39 +0100
commita9e351e00d023829a5bb7def60208eef826b2ef3 (patch)
tree05ffddc6adf375e658e348dd06c7c3fca5a5ad18
parentd65841a2db7b8ee94306b5aa3751825d627d25c3 (diff)
downloadmpd-a9e351e00d023829a5bb7def60208eef826b2ef3.tar.gz
mpd-a9e351e00d023829a5bb7def60208eef826b2ef3.tar.xz
mpd-a9e351e00d023829a5bb7def60208eef826b2ef3.zip
decoder/gme: fix memory leak in container_scan()
-rw-r--r--NEWS2
-rw-r--r--src/decoder/GmeDecoderPlugin.cxx1
2 files changed, 3 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 7a12778d5..e5f19470e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
ver 0.18.10 (not yet released)
+* decoder
+ - gme: fix memory leak
ver 0.18.9 (2014/03/02)
* protocol
diff --git a/src/decoder/GmeDecoderPlugin.cxx b/src/decoder/GmeDecoderPlugin.cxx
index 815fd8d69..d67ee4b42 100644
--- a/src/decoder/GmeDecoderPlugin.cxx
+++ b/src/decoder/GmeDecoderPlugin.cxx
@@ -117,6 +117,7 @@ gme_container_scan(const char *path_fs, const unsigned int tnum)
}
const unsigned num_songs = gme_track_count(emu);
+ gme_delete(emu);
/* if it only contains a single tune, don't treat as container */
if (num_songs < 2)
return nullptr;