aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-11 15:01:33 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-11 15:01:43 +0100
commit015ca20030be077c4bc084244e3fc267e1b72e52 (patch)
tree467054fb88e1c6f73fc372eebd7cfcda23d8bd80
parente06f5c6f94835374fc34eb2be4fa3d338d6a7dce (diff)
parentf91d94bdfc3f5f83ff0be4d19d10d0a35697386f (diff)
downloadffmpeg-015ca20030be077c4bc084244e3fc267e1b72e52.tar.gz
Merge commit 'f91d94bdfc3f5f83ff0be4d19d10d0a35697386f'
* commit 'f91d94bdfc3f5f83ff0be4d19d10d0a35697386f': vc1dec: Properly call deinit function on error Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r--libavcodec/vc1dec.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 9c49f6af10..4d839673eb 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -373,20 +373,14 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
if (!v->mv_type_mb_plane || !v->direct_mb_plane || !v->acpred_plane || !v->over_flags_plane ||
!v->block || !v->cbp_base || !v->ttblk_base || !v->is_intra_base || !v->luma_mv_base ||
!v->mb_type_base) {
- av_freep(&v->mv_type_mb_plane);
- av_freep(&v->direct_mb_plane);
- av_freep(&v->acpred_plane);
- av_freep(&v->over_flags_plane);
- av_freep(&v->block);
- av_freep(&v->cbp_base);
- av_freep(&v->ttblk_base);
- av_freep(&v->is_intra_base);
- av_freep(&v->luma_mv_base);
- av_freep(&v->mb_type_base);
- return AVERROR(ENOMEM);
+ goto error;
}
return 0;
+
+error:
+ ff_vc1_decode_end(s->avctx);
+ return AVERROR(ENOMEM);
}
av_cold void ff_vc1_init_transposed_scantables(VC1Context *v)