diff --git a/libavcodec/utils.c b/libavcodec/utils.c index fc56d69b31..131c156a6c 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -803,7 +803,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code ret = ff_lock_avcodec(avctx); if (ret < 0) - goto end; + return ret; avctx->internal = av_mallocz(sizeof(AVCodecInternal)); if (!avctx->internal) {