Unified · Split
| @@ -362,20 +362,14 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v) · 361 unmodified lines | ||
| 362 | 362 | if (!v->mv_type_mb_plane || !v->direct_mb_plane || !v->acpred_plane || !v->over_flags_plane || |
| 363 | 363 | !v->block || !v->cbp_base || !v->ttblk_base || !v->is_intra_base || !v->luma_mv_base || |
| 364 | 364 | !v->mb_type_base) { |
| 365 | − av_freep(&v->mv_type_mb_plane); | |
| 366 | − av_freep(&v->direct_mb_plane); | |
| 367 | − av_freep(&v->acpred_plane); | |
| 368 | − av_freep(&v->over_flags_plane); | |
| 369 | − av_freep(&v->block); | |
| 370 | − av_freep(&v->cbp_base); | |
| 371 | − av_freep(&v->ttblk_base); | |
| 372 | − av_freep(&v->is_intra_base); | |
| 373 | − av_freep(&v->luma_mv_base); | |
| 374 | − av_freep(&v->mb_type_base); | |
| 375 | − return AVERROR(ENOMEM); | |
| 365 | + goto error; | |
| 376 | 366 | } |
| 377 | 367 | |
| 378 | 368 | return 0; |
| 369 | + | |
| 370 | +error: | |
| 371 | + ff_vc1_decode_end(s->avctx); | |
| 372 | + return AVERROR(ENOMEM); | |
| 379 | 373 | } |
| 380 | 374 | |
| 381 | 375 | av_cold void ff_vc1_init_transposed_scantables(VC1Context *v) |