Commit 51b19321 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/avidec: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e631872f
...@@ -1847,12 +1847,12 @@ static int avi_read_close(AVFormatContext *s) ...@@ -1847,12 +1847,12 @@ static int avi_read_close(AVFormatContext *s)
av_freep(&ast->sub_ctx->pb); av_freep(&ast->sub_ctx->pb);
avformat_close_input(&ast->sub_ctx); avformat_close_input(&ast->sub_ctx);
} }
av_free(ast->sub_buffer); av_freep(&ast->sub_buffer);
av_free_packet(&ast->sub_pkt); av_free_packet(&ast->sub_pkt);
} }
} }
av_free(avi->dv_demux); av_freep(&avi->dv_demux);
return 0; 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