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.
This commit is contained in:
Max Kellermann
2010-06-01 09:10:58 +02:00
parent 747e945d29
commit caf93d9a2c
6 changed files with 39 additions and 16 deletions
+6 -1
View File
@@ -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;
}