pthreads_frame: Do not leak on failure path
authorLuca Barbato <lu_zero@gentoo.org>
Thu, 30 Oct 2014 00:51:59 +0000 (00:51 +0000)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Thu, 6 Nov 2014 15:44:46 +0000 (10:44 -0500)
CC: libav-stable@libav.org
Bug-Id: CID 1135767
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
libavcodec/pthread_frame.c

index 15bd694..effc9a5 100644 (file)
@@ -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;
         }