# HG changeset patch # User Jussi Judin # Date 1199892348 21600 # Node ID 2421c87fb85510c956a160ee473aeeec88a41c8d # Parent 4f84615468b7c6fac97ffe3c4359ef743a1f23d2 Fix memory leak in mad plugin when changing songs and writing output. (Bugzilla #82) diff -r 4f84615468b7 -r 2421c87fb855 src/madplug/decoder.c --- a/src/madplug/decoder.c Wed Jan 09 09:24:30 2008 -0600 +++ b/src/madplug/decoder.c Wed Jan 09 09:25:48 2008 -0600 @@ -153,12 +153,12 @@ } } assert(pos == olen); - if (!info->playback->playing) + if (!info->playback->playing) { + g_free(output); return; + } info->playback->pass_audio(info->playback, FMT_S16_LE, MAD_NCHANNELS(header), olen, output, &(info->playback->playing)); - if (!info->playback->playing) - return; g_free(output); }