PlaylistRegistry: use std::string for temporary allocation
This commit is contained in:
parent
25c208d81d
commit
77a1133723
@ -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 *
|
||||||
|
Loading…
Reference in New Issue
Block a user