Mercurial > audlegacy-plugins
diff src/madplug/decoder.c @ 2287:2421c87fb855
Fix memory leak in mad plugin when changing songs and writing output. (Bugzilla #82)
| author | Jussi Judin <jjudin+audacious@iki.fi> |
|---|---|
| date | Wed, 09 Jan 2008 09:25:48 -0600 |
| parents | d25cd7e7eddb |
| children | 47d7a45b26a0 |
line wrap: on
line diff
--- 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); }
