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)
return nullptr;
/* probe only the portion before the semicolon*/
char *mime = g_strndup(full_mime, semicolon - full_mime);
auto playlist = playlist_list_open_stream_mime2(is, mime);
g_free(mime);
return playlist;
const std::string mime(full_mime, semicolon);
return playlist_list_open_stream_mime2(is, mime.c_str());
}
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