diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 15:27:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 16:17:32 +0200 |
commit | d2d96f9e47d62f151d7217b0c1393761c6e2b240 (patch) | |
tree | a560f970b684ad50329f13c03ea045efe5e4ebb2 /libavformat/smacker.c | |
parent | b211607b5c97b9f0c30764c0abacc90abd9a4cc2 (diff) | |
download | ffmpeg-d2d96f9e47d62f151d7217b0c1393761c6e2b240.tar.gz |
vformat/smacker: use av_freep() to ensure no stale pointers remain
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/smacker.c')
-rw-r--r-- | libavformat/smacker.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c index 65440c9c57..062195b730 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -217,14 +217,14 @@ static int smacker_read_header(AVFormatContext *s) st->codec->extradata_size = smk->treesize + 16; if(!st->codec->extradata){ av_log(s, AV_LOG_ERROR, "Cannot allocate %i bytes of extradata\n", smk->treesize + 16); - av_free(smk->frm_size); - av_free(smk->frm_flags); + av_freep(&smk->frm_size); + av_freep(&smk->frm_flags); return AVERROR(ENOMEM); } ret = avio_read(pb, st->codec->extradata + 16, st->codec->extradata_size - 16); if(ret != st->codec->extradata_size - 16){ - av_free(smk->frm_size); - av_free(smk->frm_flags); + av_freep(&smk->frm_size); + av_freep(&smk->frm_flags); return AVERROR(EIO); } ((int32_t*)st->codec->extradata)[0] = av_le2ne32(smk->mmap_size); @@ -369,9 +369,9 @@ static int smacker_read_close(AVFormatContext *s) int i; for(i = 0; i < 7; i++) - av_free(smk->bufs[i]); - av_free(smk->frm_size); - av_free(smk->frm_flags); + av_freep(&smk->bufs[i]); + av_freep(&smk->frm_size); + av_freep(&smk->frm_flags); return 0; } |