Commit beec818d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/truemotion2: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 61fc1cbf
...@@ -996,14 +996,14 @@ static av_cold int decode_end(AVCodecContext *avctx) ...@@ -996,14 +996,14 @@ static av_cold int decode_end(AVCodecContext *avctx)
av_free(l->last); av_free(l->last);
av_free(l->clast); av_free(l->clast);
for (i = 0; i < TM2_NUM_STREAMS; i++) for (i = 0; i < TM2_NUM_STREAMS; i++)
av_free(l->tokens[i]); av_freep(&l->tokens[i]);
if (l->Y1) { if (l->Y1) {
av_free(l->Y1_base); av_freep(&l->Y1_base);
av_free(l->U1_base); av_freep(&l->U1_base);
av_free(l->V1_base); av_freep(&l->V1_base);
av_free(l->Y2_base); av_freep(&l->Y2_base);
av_free(l->U2_base); av_freep(&l->U2_base);
av_free(l->V2_base); av_freep(&l->V2_base);
} }
av_freep(&l->buffer); av_freep(&l->buffer);
l->buffer_size = 0; l->buffer_size = 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