1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_dctdnoiz: use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-12-14 15:56:32 +01:00
parent eb055295bd
commit 6de2f027cd

View File

@ -732,14 +732,14 @@ static av_cold void uninit(AVFilterContext *ctx)
int i; int i;
DCTdnoizContext *s = ctx->priv; DCTdnoizContext *s = ctx->priv;
av_free(s->weights); av_freep(&s->weights);
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
av_free(s->cbuf[i][0]); av_freep(&s->cbuf[i][0]);
av_free(s->cbuf[i][1]); av_freep(&s->cbuf[i][1]);
av_free(s->cbuf[i][2]); av_freep(&s->cbuf[i][2]);
} }
for (i = 0; i < s->nb_threads; i++) { for (i = 0; i < s->nb_threads; i++) {
av_free(s->slices[i]); av_freep(&s->slices[i]);
av_expr_free(s->expr[i]); av_expr_free(s->expr[i]);
} }
} }