Mercurial > libavformat.hg
changeset 3393:f95ddc69c48d libavformat
memleak / CID124 RUN2
author | michael |
---|---|
date | Wed, 28 May 2008 22:26:35 +0000 |
parents | 4b7dccbc0d81 |
children | 02efb6e3eefa |
files | sierravmd.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sierravmd.c Wed May 28 22:00:45 2008 +0000 +++ b/sierravmd.c Wed May 28 22:26:35 2008 +0000 @@ -146,11 +146,11 @@ vmd->frame_table = NULL; sound_buffers = AV_RL16(&vmd->vmd_header[808]); raw_frame_table_size = vmd->frame_count * 6; - raw_frame_table = av_malloc(raw_frame_table_size); if(vmd->frame_count * vmd->frames_per_block >= UINT_MAX / sizeof(vmd_frame_t)){ av_log(s, AV_LOG_ERROR, "vmd->frame_count * vmd->frames_per_block too large\n"); return -1; } + raw_frame_table = av_malloc(raw_frame_table_size); vmd->frame_table = av_malloc((vmd->frame_count * vmd->frames_per_block + sound_buffers) * sizeof(vmd_frame_t)); if (!raw_frame_table || !vmd->frame_table) { av_free(raw_frame_table);