Originally committed as revision 19064 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -573,6 +573,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 572 unmodified lines | ||
| 573 | 573 | zret = inflateInit(&c->zstream); |
| 574 | 574 | if (zret != Z_OK) { |
| 575 | 575 | av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret); |
| 576 | + av_freep(&c->decomp_buf); | |
| 576 | 577 | return 1; |
| 577 | 578 | } |
| 578 | 579 | } |
| @@ -590,6 +591,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 11 unmodified lines | ||
| 590 | 591 | { |
| 591 | 592 | LclDecContext * const c = avctx->priv_data; |
| 592 | 593 | |
| 594 | + av_freep(&c->decomp_buf); | |
| 593 | 595 | if (c->pic.data[0]) |
| 594 | 596 | avctx->release_buffer(avctx, &c->pic); |
| 595 | 597 | #if CONFIG_ZLIB_DECODER |