changeset 23704:ce80673fbf0d

Add some missing frees.
author reimar
date Thu, 05 Jul 2007 22:06:05 +0000
parents 9fb716ab06a3
children 7c04f822ae6e
files libmpdemux/demux_mkv.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Thu Jul 05 22:01:07 2007 +0000
+++ b/libmpdemux/demux_mkv.c	Thu Jul 05 22:06:05 2007 +0000
@@ -3261,8 +3261,10 @@
                 case MATROSKA_ID_BLOCKDURATION:
                   {
                     block_duration = ebml_read_uint (s, &l);
-                    if (block_duration == EBML_UINT_INVALID)
+                    if (block_duration == EBML_UINT_INVALID) {
+                      free(block);
                       return 0;
+                    }
                     block_duration *= mkv_d->tc_scale / 1000000.0;
                     break;
                   }
@@ -3284,8 +3286,10 @@
                 case MATROSKA_ID_REFERENCEBLOCK:
                   {
                     int64_t num = ebml_read_int (s, &l);
-                    if (num == EBML_INT_INVALID)
+                    if (num == EBML_INT_INVALID) {
+                      free(block);
                       return 0;
+                    }
                     if (num <= 0)
                       block_bref = num;
                     else
@@ -3294,6 +3298,7 @@
                   }
 
                 case EBML_ID_INVALID:
+                  free(block);
                   return 0;
 
                 default: