History

Merge commit 'f91d94bdfc3f5f83ff0be4d19d10d0a35697386f'

* commit 'f91d94bdfc3f5f83ff0be4d19d10d0a35697386f': vc1dec: Properly call deinit function on error

Derek Buitenhuis committed 10 years ago

Commit 015ca202 parents e06f5c6 f91d94b1 file · +5 −11Browse files

Unified · Split

libavcodec/vc1dec.c+5−11
@@ -373,20 +373,14 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v) · 372 unmodified lines
373373 if (!v->mv_type_mb_plane || !v->direct_mb_plane || !v->acpred_plane || !v->over_flags_plane ||
374374 !v->block || !v->cbp_base || !v->ttblk_base || !v->is_intra_base || !v->luma_mv_base ||
375375 !v->mb_type_base) {
376− av_freep(&v->mv_type_mb_plane);
377− av_freep(&v->direct_mb_plane);
378− av_freep(&v->acpred_plane);
379− av_freep(&v->over_flags_plane);
380− av_freep(&v->block);
381− av_freep(&v->cbp_base);
382− av_freep(&v->ttblk_base);
383− av_freep(&v->is_intra_base);
384− av_freep(&v->luma_mv_base);
385− av_freep(&v->mb_type_base);
386− return AVERROR(ENOMEM);
376+ goto error;
387377 }
388378
389379 return 0;
380+
381+error:
382+ ff_vc1_decode_end(s->avctx);
383+ return AVERROR(ENOMEM);
390384 }
391385
392386 av_cold void ff_vc1_init_transposed_scantables(VC1Context *v)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t