Remove -malign-double from lib build.
authorMonty <xiphmont@xiph.org>
Wed, 13 Oct 1999 03:51:39 +0000 (03:51 +0000)
committerMonty <xiphmont@xiph.org>
Wed, 13 Oct 1999 03:51:39 +0000 (03:51 +0000)
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

lib/decoder_example.c
lib/encoder_example.c

index 62acc70..5fdf79a 100644 (file)
@@ -241,9 +241,9 @@ int main(){
   /* 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);
index e8b00e0..66e9e86 100644 (file)
@@ -140,12 +140,12 @@ int main(){
     }
   }
 
-  /* 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 */