aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-15 21:20:18 +0200
committerMax Kellermann <max@duempel.org>2013-10-15 22:49:51 +0200
commit77a11337230ac026a5519b69018fa76fc0462fe9 (patch)
treefd631227989970cc0d1b6bdae39f99a2a8bfc71b /src
parent25c208d81d341dd940b5b672af2442c0819e6bb6 (diff)
downloadmpd-77a11337230ac026a5519b69018fa76fc0462fe9.tar.gz
mpd-77a11337230ac026a5519b69018fa76fc0462fe9.tar.xz
mpd-77a11337230ac026a5519b69018fa76fc0462fe9.zip
PlaylistRegistry: use std::string for temporary allocation
Diffstat (limited to 'src')
-rw-r--r--src/PlaylistRegistry.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/PlaylistRegistry.cxx b/src/PlaylistRegistry.cxx
index fe6b4cd33..2a4cf8c5d 100644
--- a/src/PlaylistRegistry.cxx
+++ b/src/PlaylistRegistry.cxx
@@ -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 *