Browse Source

avcodec/mlpenc: free filter state buffers on allocation failure

Signed-off-by: James Almer <jamrial@gmail.com>
tags/n4.4
James Almer 5 years ago
parent
commit
52b9bd2c95
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/mlpenc.c

+ 2
- 1
libavcodec/mlpenc.c View File

@@ -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;
}
}



Loading…
Cancel
Save