[xiph-commits] r3307 - liboggplay/trunk/src/liboggplay

shans at svn.annodex.net shans at svn.annodex.net
Sat Dec 8 16:25:55 PST 2007


Author: shans
Date: 2007-12-08 16:25:53 -0800 (Sat, 08 Dec 2007)
New Revision: 3307

Modified:
   liboggplay/trunk/src/liboggplay/oggplay_callback_info.c
Log:
Minor memory leak



Modified: liboggplay/trunk/src/liboggplay/oggplay_callback_info.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_callback_info.c	2007-12-08 12:45:08 UTC (rev 3306)
+++ liboggplay/trunk/src/liboggplay/oggplay_callback_info.c	2007-12-09 00:25:53 UTC (rev 3307)
@@ -163,7 +163,7 @@
  
     }
 
-    /* 
+    /*
     printf("%d: %d/%d\t", i, 
                     track_info->required_records, count);
     
@@ -175,7 +175,6 @@
     }
     */
 
-
     /*
      * this statement detects if this track needs records but has none.
      * We need to be careful - there are 2 cases where this could happen.  The
@@ -262,11 +261,19 @@
      * indicate that we need to go through another round of fragment collection
      * and callback creation
      */
+    for (i = 0; i < me->num_tracks; i++) {
+      if ((*info)[i]->records != NULL) free((*info)[i]->records);
+    }
+    free(*info);
     (*info) = NULL;
 
   }
 
   if (tcount == 0) {
+    for (i = 0; i < me->num_tracks; i++) {
+      if ((*info)[i]->records != NULL) free((*info)[i]->records);
+    }
+    free(*info);
     (*info) = NULL;
   }
 



More information about the commits mailing list