diff options
author | Max Kellermann <max@duempel.org> | 2010-06-01 09:10:58 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-06-01 09:59:54 +0200 |
commit | caf93d9a2c2360a5b4a1d841fb83394d6bf4fc09 (patch) | |
tree | 0bc9ab2cd488cb508e183d05cffeff54fb3995ad /src/playlist_list.c | |
parent | 747e945d29e847403cec928ca4a3df7f27864cfc (diff) | |
download | mpd-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 '')
-rw-r--r-- | src/playlist_list.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/playlist_list.c b/src/playlist_list.c index 1419c6ac8..e8319bd17 100644 --- a/src/playlist_list.c +++ b/src/playlist_list.c @@ -284,7 +284,7 @@ playlist_suffix_supported(const char *suffix) } struct playlist_provider * -playlist_list_open_path(const char *path_fs) +playlist_list_open_path(const char *path_fs, struct input_stream **is_r) { GError *error = NULL; const char *suffix; @@ -318,7 +318,9 @@ playlist_list_open_path(const char *path_fs) } playlist = playlist_list_open_stream_suffix(is, suffix); - if (playlist == NULL) + if (playlist != NULL) + *is_r = is; + else input_stream_close(is); return playlist; |