diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 15bd69465d..effc9a5ac3 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(©); err = AVERROR(ENOMEM); goto error; }