diff options
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; |