Commit 77a11337 authored by Max Kellermann's avatar Max Kellermann

PlaylistRegistry: use std::string for temporary allocation

parent 25c208d8
...@@ -243,10 +243,8 @@ playlist_list_open_stream_mime(struct input_stream *is, const char *full_mime) ...@@ -243,10 +243,8 @@ playlist_list_open_stream_mime(struct input_stream *is, const char *full_mime)
return nullptr; return nullptr;
/* probe only the portion before the semicolon*/ /* probe only the portion before the semicolon*/
char *mime = g_strndup(full_mime, semicolon - full_mime); const std::string mime(full_mime, semicolon);
auto playlist = playlist_list_open_stream_mime2(is, mime); return playlist_list_open_stream_mime2(is, mime.c_str());
g_free(mime);
return playlist;
} }
static SongEnumerator * static SongEnumerator *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment