[FFmpeg-cvslog] avcodec/pthread_frame: Fix memleak of AVCodecContext on error

Michael Niedermayer git at videolan.org
Wed Dec 11 01:22:08 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 11 00:27:09 2013 +0100| [11679e1b90f6e52a3643efb45d06ea5adf65098a] | committer: Michael Niedermayer

avcodec/pthread_frame: Fix memleak of AVCodecContext on error

Fixes CID1135767
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11679e1b90f6e52a3643efb45d06ea5adf65098a
---

 libavcodec/pthread_frame.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 51a1633..f7a40ca 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -650,6 +650,7 @@ int ff_frame_thread_init(AVCodecContext *avctx)
         p->frame = av_frame_alloc();
         if (!p->frame) {
             err = AVERROR(ENOMEM);
+            av_freep(&copy);
             goto error;
         }
 



More information about the ffmpeg-cvslog mailing list