diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 51a163384b..f7a40ca7ec 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(©); goto error; }