[xiph-commits] r3639 - liboggz/trunk/src/tools

conrad at svn.annodex.net conrad at svn.annodex.net
Tue Jul 15 01:38:13 PDT 2008


Author: conrad
Date: 2008-07-15 01:38:12 -0700 (Tue, 15 Jul 2008)
New Revision: 3639

Modified:
   liboggz/trunk/src/tools/oggz-info.c
Log:
oggz-info: avoid referencing freed memory
Patch by ogg.k.ogg.k


Modified: liboggz/trunk/src/tools/oggz-info.c
===================================================================
--- liboggz/trunk/src/tools/oggz-info.c	2008-07-10 12:16:26 UTC (rev 3638)
+++ liboggz/trunk/src/tools/oggz-info.c	2008-07-15 08:38:12 UTC (rev 3639)
@@ -414,8 +414,8 @@
     }
     else {
       fprintf(stderr, "Warning: logical stream %08x referenced by skeleton was not found\n",fp.serial_no);
+      fisbone_clear(&fp);
     }
-    fisbone_clear(&fp);
   } else if (!op->e_o_s && !memcmp(op->packet, FISHEAD_IDENTIFIER, 8)) {
     fishead_packet fp;
     int ret = fishead_from_ogg(op, &fp);
@@ -494,7 +494,11 @@
 static void
 oit_delete (OI_Info * info, OI_TrackInfo * oit, long serialno)
 {
-  if (oit->codec_info) free (oit->codec_info);
+  if (oit->codec_info) {
+    if (oit->has_fisbone)
+      fisbone_clear (&oit->fbInfo);
+    free (oit->codec_info);
+  }
 }
 
 int



More information about the commits mailing list