]> git.sesse.net Git - vlc/commitdiff
Fix memleak in mkv.
authorRémi Duraffort <ivoire@videolan.org>
Tue, 12 Aug 2008 21:10:57 +0000 (23:10 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Tue, 12 Aug 2008 21:11:21 +0000 (23:11 +0200)
modules/demux/mkv.cpp

index ceaa77ae0eaf29981c9bacef4511033003528c3c..2f73619cbb766da13b3cd6aee4bf20d7418b059e 100644 (file)
@@ -5079,7 +5079,9 @@ void matroska_segment_c::ParseAttachments( KaxAttachments *attachments )
 
         if( new_attachment )
         {
-            new_attachment->psz_file_name  = ToUTF8( UTFstring( file_name ) );
+            char* tmp = ToUTF8( UTFstring( file_name ) );
+            new_attachment->psz_file_name  = tmp;
+            free( tmp );
             new_attachment->psz_mime_type  = psz_mime_type;
             new_attachment->i_size         = img_data.GetSize();
             new_attachment->p_data         = malloc( img_data.GetSize() );