Signed-off-by: James Almer <jamr...@gmail.com>
---
 libavcodec/mlpenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index 4d50f0ea33..52ea06ed91 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -1820,7 +1820,8 @@ static int apply_filter(MLPEncodeContext *ctx, unsigned 
int channel)
         if (!filter_state_buffer[i]) {
             av_log(ctx->avctx, AV_LOG_ERROR,
                    "Not enough memory for applying filters.\n");
-            return AVERROR(ENOMEM);
+            ret = AVERROR(ENOMEM);
+            goto free_and_return;
         }
     }
 
-- 
2.27.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to