diff options
author | Max Kellermann <max@duempel.org> | 2013-10-15 21:18:55 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-15 22:49:23 +0200 |
commit | 25c208d81d341dd940b5b672af2442c0819e6bb6 (patch) | |
tree | ee4928cea75fb72c5a36d83d9a4fc4a73a4d643c /src/input/CdioParanoiaInputPlugin.cxx | |
parent | 67f87db511a7284fbadf65bbf984480d1eaaeabc (diff) | |
download | mpd-25c208d81d341dd940b5b672af2442c0819e6bb6.tar.gz mpd-25c208d81d341dd940b5b672af2442c0819e6bb6.tar.xz mpd-25c208d81d341dd940b5b672af2442c0819e6bb6.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/input/CdioParanoiaInputPlugin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |