[vlc-commits] mkv: fix memleak
Naohiro KORIYAMA
git at videolan.org
Fri Jun 15 13:51:02 CEST 2012
vlc | branch: master | Naohiro KORIYAMA <nkoriyama at gmail.com> | Fri Jun 15 00:36:50 2012 +0900| [0dbe1bd33ca1353b31d4c3b08fb9dada0a80999a] | committer: Jean-Baptiste Kempf
mkv: fix memleak
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0dbe1bd33ca1353b31d4c3b08fb9dada0a80999a
---
modules/demux/mkv/matroska_segment_parse.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 7edd0a1..c2b9a82 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1005,7 +1005,10 @@ void matroska_segment_c::ParseAttachments( KaxAttachments *attachments )
while( attachedFile && ( attachedFile->GetSize() > 0 ) )
{
KaxFileData &img_data = GetChild<KaxFileData>( *attachedFile );
- attachment_c *new_attachment = new attachment_c( ToUTF8( UTFstring( GetChild<KaxFileName>( *attachedFile ) ) ),
+ char *psz_tmp_utf8 = ToUTF8( UTFstring( GetChild<KaxFileName>( *attachedFile ) ) );
+ std::string attached_filename(psz_tmp_utf8);
+ free(psz_tmp_utf8);
+ attachment_c *new_attachment = new attachment_c( attached_filename,
GetChild<KaxMimeType>( *attachedFile ),
img_data.GetSize() );
More information about the vlc-commits
mailing list