[FFmpeg-devel] [PATCH] fix a few corner case memory leaks
Benoit Fouet
benoit.fouet
Fri Jul 18 09:17:17 CEST 2008
Michael Niedermayer wrote:
> On Thu, Jul 17, 2008 at 12:23:20PM -0700, Erik Hovland wrote:
>
>> The following patch fixes a few corner case memory leaks.
>>
> [...]
>
>> diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
>> index f1a7232..6edf746 100644
>> --- a/libavcodec/vc1.c
>> +++ b/libavcodec/vc1.c
>> @@ -4005,6 +4005,7 @@ static int vc1_decode_frame(AVCodecContext *avctx,
>> divider = find_next_marker(buf, buf + buf_size);
>> if((divider == (buf + buf_size)) || AV_RB32(divider) != VC1_CODE_FIELD){
>> av_log(avctx, AV_LOG_ERROR, "Error in WVC1 interlaced frame\n");
>> + av_free(buf2);
>> return -1;
>> }
>>
>
> not maintained by me either, but patch ok
>
>
>
applied (seemed trivial enough to be applied)
> [...]
>
>> diff --git a/libavformat/utils.c b/libavformat/utils.c
>> index 02ab108..44299f9 100644
>> --- a/libavformat/utils.c
>> +++ b/libavformat/utils.c
>> @@ -2020,8 +2020,10 @@ int av_find_stream_info(AVFormatContext *ic)
>> }
>>
>> pkt= add_to_pktbuf(&ic->packet_buffer, &pkt1);
>> - if(av_dup_packet(pkt) < 0)
>> + if(av_dup_packet(pkt) < 0) {
>> + av_free(duration_error);
>> return AVERROR(ENOMEM);
>> + }
>>
>>
>
> ok
>
> [...]
>
>
applied
--
Benoit Fouet
Purple Labs S.A.
www.purplelabs.com
More information about the ffmpeg-devel
mailing list