Fix a memory leak in the examples and xmms plugin (vorbis_info_clear
has to come after vorbis_dsp_clear())
Monty
svn path=/trunk/vorbis/; revision=147
/* ogg_page and ogg_packet structs always point to storage in
libvorbis. They're never freed or manipulated directly */
- vorbis_info_clear(&vi);
vorbis_dsp_clear(&vd);
vorbis_block_clear(&vb);
+ vorbis_info_clear(&vi); /* must be called last */
fprintf(stderr,"Done.\n");
return(0);
}
}
- /* clean up and exit */
+ /* clean up and exit. vorbis_info_clear() must be called last */
ogg_stream_clear(&os);
- vorbis_info_clear(&vi);
vorbis_dsp_clear(&vd);
vorbis_block_clear(&vb);
+ vorbis_info_clear(&vi);
/* ogg_page and ogg_packet structs always point to storage in
libvorbis. They're never freed or manipulated directly */