More possible memleaks.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20161 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-10-11 15:57:51 +00:00
parent de216f1950
commit d0947a5bb7
1 changed files with 7 additions and 0 deletions

View File

@ -3538,10 +3538,14 @@ demux_mkv_fill_buffer (demuxer_t *demuxer, demux_stream_t *ds)
case MATROSKA_ID_BLOCK: case MATROSKA_ID_BLOCK:
block_length = ebml_read_length (s, &tmp); block_length = ebml_read_length (s, &tmp);
free(block);
block = malloc (block_length); block = malloc (block_length);
demuxer->filepos = stream_tell (s); demuxer->filepos = stream_tell (s);
if (stream_read (s,block,block_length) != (int) block_length) if (stream_read (s,block,block_length) != (int) block_length)
{
free(block);
return 0; return 0;
}
l = tmp + block_length; l = tmp + block_length;
break; break;
@ -3609,7 +3613,10 @@ demux_mkv_fill_buffer (demuxer_t *demuxer, demux_stream_t *ds)
block = malloc (block_length); block = malloc (block_length);
demuxer->filepos = stream_tell (s); demuxer->filepos = stream_tell (s);
if (stream_read (s,block,block_length) != (int) block_length) if (stream_read (s,block,block_length) != (int) block_length)
{
free(block);
return 0; return 0;
}
l = tmp + block_length; l = tmp + block_length;
res = handle_block (demuxer, block, block_length, res = handle_block (demuxer, block, block_length,
block_duration, block_bref, block_fref, 1); block_duration, block_bref, block_fref, 1);