Commit 3537ddb7 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/cavs: use av_freep(), do not leave stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0d71bd5a
......@@ -822,16 +822,16 @@ av_cold int ff_cavs_end(AVCodecContext *avctx)
av_frame_free(&h->DPB[0].f);
av_frame_free(&h->DPB[1].f);
av_free(h->top_qp);
av_free(h->top_mv[0]);
av_free(h->top_mv[1]);
av_free(h->top_pred_Y);
av_free(h->top_border_y);
av_free(h->top_border_u);
av_free(h->top_border_v);
av_free(h->col_mv);
av_free(h->col_type_base);
av_free(h->block);
av_freep(&h->top_qp);
av_freep(&h->top_mv[0]);
av_freep(&h->top_mv[1]);
av_freep(&h->top_pred_Y);
av_freep(&h->top_border_y);
av_freep(&h->top_border_u);
av_freep(&h->top_border_v);
av_freep(&h->col_mv);
av_freep(&h->col_type_base);
av_freep(&h->block);
av_freep(&h->edge_emu_buffer);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment