From caf93d9a2c2360a5b4a1d841fb83394d6bf4fc09 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 1 Jun 2010 09:10:58 +0200 Subject: 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. --- src/playlist_mapper.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/playlist_mapper.h') diff --git a/src/playlist_mapper.h b/src/playlist_mapper.h index 045c4b0d7..b98af1b13 100644 --- a/src/playlist_mapper.h +++ b/src/playlist_mapper.h @@ -20,11 +20,17 @@ #ifndef MPD_PLAYLIST_MAPPER_H #define MPD_PLAYLIST_MAPPER_H +struct input_stream; + /** * Opens a playlist from an URI relative to the playlist or music * directory. + * + * @param is_r on success, an input_stream object may be returned + * here, which must be closed after the playlist_provider object is + * freed */ struct playlist_provider * -playlist_mapper_open(const char *uri); +playlist_mapper_open(const char *uri, struct input_stream **is_r); #endif -- cgit v1.2.3