]> granicus.if.org Git - libass/commitdiff
Free tracks properly
authorGrigori Goronzy <greg@blackbox>
Fri, 24 Jul 2009 07:58:01 +0000 (09:58 +0200)
committerGrigori Goronzy <greg@blackbox>
Fri, 24 Jul 2009 13:39:20 +0000 (15:39 +0200)
When freeing a track, also free the track name and the track itself.
Leak found by valgrind/memcheck.

libass/ass.c

index 9eaa7b01d0f34dbe9cb700e72263be57f4cd2236..37e5e59e84428999f4003c889d8bb2c9c90bec0a 100644 (file)
@@ -77,6 +77,8 @@ void ass_free_track(ass_track_t *track)
             ass_free_event(track, i);
         free(track->events);
     }
+    free(track->name);
+    free(track);
 }
 
 /// \brief Allocate a new style struct