aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_queue.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-06-01 09:10:58 +0200
committerMax Kellermann <max@duempel.org>2010-06-01 09:59:54 +0200
commitcaf93d9a2c2360a5b4a1d841fb83394d6bf4fc09 (patch)
tree0bc9ab2cd488cb508e183d05cffeff54fb3995ad /src/playlist_queue.c
parent747e945d29e847403cec928ca4a3df7f27864cfc (diff)
downloadmpd-caf93d9a2c2360a5b4a1d841fb83394d6bf4fc09.tar.gz
mpd-caf93d9a2c2360a5b4a1d841fb83394d6bf4fc09.tar.xz
mpd-caf93d9a2c2360a5b4a1d841fb83394d6bf4fc09.zip
playlist_list: playlist_list_open_path() returns input_stream
Memory leak fix. The input_stream object passed to playlist_list_open_stream_suffix() must be closed by the caller - this however never happens in playlist_list_open_path(), because it does not return it to the caller.
Diffstat (limited to 'src/playlist_queue.c')
-rw-r--r--src/playlist_queue.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/playlist_queue.c b/src/playlist_queue.c
index 4bda90c76..9241d4774 100644
--- a/src/playlist_queue.c
+++ b/src/playlist_queue.c
@@ -101,11 +101,16 @@ playlist_open_into_queue(const char *uri, struct playlist *dest)
if (uri_has_scheme(uri))
return playlist_open_remote_into_queue(uri, dest);
- struct playlist_provider *playlist = playlist_mapper_open(uri);
+ struct input_stream *is;
+ struct playlist_provider *playlist = playlist_mapper_open(uri, &is);
if (playlist != NULL) {
enum playlist_result result =
playlist_load_into_queue(uri, playlist, dest);
playlist_plugin_close(playlist);
+
+ if (is != NULL)
+ input_stream_close(is);
+
return result;
}