From 25c208d81d341dd940b5b672af2442c0819e6bb6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Oct 2013 21:18:55 +0200 Subject: input/*: don't allocate attribute "mime" This was a memory leak, because "mime" was a std::string which created another copy and discarded the allocated buffer. --- src/input/DespotifyInputPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input/DespotifyInputPlugin.cxx') diff --git a/src/input/DespotifyInputPlugin.cxx b/src/input/DespotifyInputPlugin.cxx index b0665e659..27c54160c 100644 --- a/src/input/DespotifyInputPlugin.cxx +++ b/src/input/DespotifyInputPlugin.cxx @@ -60,7 +60,7 @@ struct DespotifyInputStream { memset(&pcm, 0, sizeof(pcm)); /* Despotify outputs pcm data */ - base.mime = g_strdup("audio/x-mpd-cdda-pcm"); + base.mime = "audio/x-mpd-cdda-pcm"; base.ready = true; } -- cgit v1.2.3