[FFmpeg-devel] [PATCH] fix a few corner case memory leaks
Michael Niedermayer
michaelni
Thu Jul 17 22:42:14 CEST 2008
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/ffserver.c b/ffserver.c
> index bc282c9..de135cc 100644
> --- a/ffserver.c
> +++ b/ffserver.c
not maintained by me
> 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
>
> diff --git a/libavformat/framehook.c b/libavformat/framehook.c
> index eb5184f..02d7b82 100644
> --- a/libavformat/framehook.c
> +++ b/libavformat/framehook.c
deprecated, unmaintained
[...]
> 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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080717/29b51b81/attachment.pgp>
More information about the ffmpeg-devel
mailing list