Fix memleak due to c->decomp_buf never being freed.
Originally committed as revision 19064 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -573,6 +573,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
zret = inflateInit(&c->zstream);
|
zret = inflateInit(&c->zstream);
|
||||||
if (zret != Z_OK) {
|
if (zret != Z_OK) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
|
av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
|
||||||
|
av_freep(&c->decomp_buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -590,6 +591,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
{
|
{
|
||||||
LclDecContext * const c = avctx->priv_data;
|
LclDecContext * const c = avctx->priv_data;
|
||||||
|
|
||||||
|
av_freep(&c->decomp_buf);
|
||||||
if (c->pic.data[0])
|
if (c->pic.data[0])
|
||||||
avctx->release_buffer(avctx, &c->pic);
|
avctx->release_buffer(avctx, &c->pic);
|
||||||
#if CONFIG_ZLIB_DECODER
|
#if CONFIG_ZLIB_DECODER
|
||||||
|
Reference in New Issue
Block a user