[FFmpeg-devel] [PATCH] indeo3: check return values of av_malloc()

Paul B Mahol onemda at gmail.com
Sun Jun 30 21:50:28 CEST 2013


On 6/30/13, Paul B Mahol <onemda at gmail.com> wrote:
> On 6/30/13, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>> Paul B Mahol <onemda <at> gmail.com> writes:
>>
>>>  ctx->planes[p].buffers[0] = av_malloc(!p ? luma_size : chroma_size);
>>>  ctx->planes[p].buffers[1] = av_malloc(!p ? luma_size : chroma_size);
>>>
>>> +    if (!ctx->planes[p].buffers[0] || !ctx->planes[p].buffers[1])
>>> +        return AVERROR(ENOMEM);
>>
>> Possible memleak.
> Not at all. Read carefully next time.

Actually there was one, fixed and applied.


More information about the ffmpeg-devel mailing list