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/CdioParanoiaInputPlugin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input/CdioParanoiaInputPlugin.cxx') diff --git a/src/input/CdioParanoiaInputPlugin.cxx b/src/input/CdioParanoiaInputPlugin.cxx index 65db12760..e7fc83571 100644 --- a/src/input/CdioParanoiaInputPlugin.cxx +++ b/src/input/CdioParanoiaInputPlugin.cxx @@ -240,9 +240,9 @@ input_cdio_open(const char *uri, i->base.size = (i->lsn_to - i->lsn_from + 1) * CDIO_CD_FRAMESIZE_RAW; /* hack to make MPD select the "pcm" decoder plugin */ - i->base.mime = g_strdup(reverse_endian - ? "audio/x-mpd-cdda-pcm-reverse" - : "audio/x-mpd-cdda-pcm"); + i->base.mime = reverse_endian + ? "audio/x-mpd-cdda-pcm-reverse" + : "audio/x-mpd-cdda-pcm"; return &i->base; } -- cgit v1.2.3