Fix for Mozilla BZ#550184 and Xiph Trac #1656
authorMonty <xiphmont@xiph.org>
Thu, 25 Mar 2010 05:29:15 +0000 (05:29 +0000)
committerMonty <xiphmont@xiph.org>
Thu, 25 Mar 2010 05:29:15 +0000 (05:29 +0000)
svn path=/trunk/vorbis/; revision=17029

lib/info.c

index 4720b93..1f0b7e9 100644 (file)
@@ -628,12 +628,12 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
   oggpack_writeclear(&opb);
   return(0);
  err_out:
-  oggpack_writeclear(&opb);
   memset(op,0,sizeof(*op));
   memset(op_comm,0,sizeof(*op_comm));
   memset(op_code,0,sizeof(*op_code));
 
   if(b){
+    oggpack_writeclear(&opb);
     if(b->header)_ogg_free(b->header);
     if(b->header1)_ogg_free(b->header1);
     if(b->header2)_ogg_free(b->header2);