avformat/sierravmd: use av_freep() for freeing context fields

This ensures that there are no stale pointers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-16 14:39:45 +02:00
parent 563057731a
commit 02f56bfcc3

View File

@ -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;
}