From 02f56bfcc3f596defccfa968a81372a2e21b2cfa Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 16 Sep 2013 14:39:45 +0200 Subject: [PATCH] avformat/sierravmd: use av_freep() for freeing context fields This ensures that there are no stale pointers Signed-off-by: Michael Niedermayer --- libavformat/sierravmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c index 9366a8f5dc..fad3dd3d8a 100644 --- a/libavformat/sierravmd.c +++ b/libavformat/sierravmd.c @@ -252,8 +252,8 @@ static int vmd_read_header(AVFormatContext *s) return 0; error: - av_free(raw_frame_table); - av_free(vmd->frame_table); + av_freep(&raw_frame_table); + av_freep(&vmd->frame_table); return ret; } @@ -304,7 +304,7 @@ static int vmd_read_close(AVFormatContext *s) { VmdDemuxContext *vmd = s->priv_data; - av_free(vmd->frame_table); + av_freep(&vmd->frame_table); return 0; }