diff options
author | Max Kellermann <max@duempel.org> | 2014-01-08 22:14:12 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-08 22:14:12 +0100 |
commit | 139122c57f00b9abf2058fb8c481abb958926b5c (patch) | |
tree | e28c2c70eff66781c064d0305b005562f0346fd9 /src | |
parent | 959d7ca9d00ec480f88ef6ea45b3dab7f0e2b717 (diff) | |
parent | fdd76b346171126e143835429a26044a1cbbfb8f (diff) | |
download | mpd-139122c57f00b9abf2058fb8c481abb958926b5c.tar.gz mpd-139122c57f00b9abf2058fb8c481abb958926b5c.tar.xz mpd-139122c57f00b9abf2058fb8c481abb958926b5c.zip |
Merge branch 'v0.18.x'
Diffstat (limited to 'src')
-rw-r--r-- | src/decoder/FaadDecoderPlugin.cxx | 2 | ||||
-rw-r--r-- | src/playlist/PlsPlaylistPlugin.cxx | 1 | ||||
-rw-r--r-- | src/util/UriUtil.cxx | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/decoder/FaadDecoderPlugin.cxx b/src/decoder/FaadDecoderPlugin.cxx index 242a34cb3..a37bc88bf 100644 --- a/src/decoder/FaadDecoderPlugin.cxx +++ b/src/decoder/FaadDecoderPlugin.cxx @@ -359,6 +359,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is) if (!faad_decoder_init(decoder, buffer, audio_format, error)) { LogError(error); NeAACDecClose(decoder); + decoder_buffer_free(buffer); return; } @@ -428,6 +429,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is) /* cleanup */ NeAACDecClose(decoder); + decoder_buffer_free(buffer); } static bool diff --git a/src/playlist/PlsPlaylistPlugin.cxx b/src/playlist/PlsPlaylistPlugin.cxx index 4dc7a7361..3fd420d89 100644 --- a/src/playlist/PlsPlaylistPlugin.cxx +++ b/src/playlist/PlsPlaylistPlugin.cxx @@ -67,7 +67,6 @@ pls_parser(GKeyFile *keyfile, std::forward_list<SongPointer> &songs) FormatError(pls_domain, "Invalid PLS entry %s: '%s'", key, error->message); g_error_free(error); - g_free(key); return; } diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx index 89d2a473a..174c977e1 100644 --- a/src/util/UriUtil.cxx +++ b/src/util/UriUtil.cxx @@ -42,7 +42,8 @@ const char * uri_get_suffix(const char *uri) { const char *suffix = strrchr(uri, '.'); - if (suffix == nullptr) + if (suffix == nullptr || suffix == uri || + suffix[-1] == '/' || suffix[-1] == '\\') return nullptr; ++suffix; |