[FFmpeg-cvslog] pthreads_frame: Do not leak on failure path

Luca Barbato git at videolan.org
Thu Nov 6 18:23:22 CET 2014


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Thu Oct 30 00:51:59 2014 +0000| [ac4a5e3abd8a022ab32245ad527ffc37eabab8b1] | committer: Vittorio Giovara

pthreads_frame: Do not leak on failure path

CC: libav-stable at libav.org
Bug-Id: CID 1135767
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>

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

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

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



More information about the ffmpeg-cvslog mailing list