mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
vc1dec: Fix leaks in ff_vc1_decode_init_alloc_tables on errors
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
91be1103fd
commit
ede508443e
@ -5525,8 +5525,19 @@ 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 ||
|
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->block || !v->cbp_base || !v->ttblk_base || !v->is_intra_base || !v->luma_mv_base ||
|
||||||
!v->mb_type_base)
|
!v->mb_type_base) {
|
||||||
return -1;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user