[libav-commits] pthreads_frame: Do not leak on failure path

Luca Barbato git at libav.org
Thu Nov 6 16:50:42 CET 2014


Module: libav
Branch: master
Commit: ac4a5e3abd8a022ab32245ad527ffc37eabab8b1

Author:    Luca Barbato <lu_zero at gentoo.org>
Committer: Vittorio Giovara <vittorio.giovara at gmail.com>
Date:      Thu Oct 30 00:51:59 2014 +0000

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>

---

 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 libav-commits mailing list