changeset 3493:b77ced770a93 libavformat

matroskadec: fix a memory leak
author aurel
date Sun, 22 Jun 2008 15:46:36 +0000
parents 6facc89bece8
children 8bf1a8e12b43
files matroskadec.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Sun Jun 22 08:53:44 2008 +0000
+++ b/matroskadec.c	Sun Jun 22 15:46:36 2008 +0000
@@ -2887,6 +2887,9 @@
                     memcpy (pkt->data, matroska->tracks[track]->encoding_settings, offset);
                 memcpy (pkt->data+offset, pkt_data, pkt_size);
 
+                if (pkt_data != data)
+                    av_free(pkt_data);
+
                 if (n == 0)
                     pkt->flags = is_keyframe;
                 pkt->stream_index = stream_index;