Commit 9367e3ec authored by Angie Chiang's avatar Angie Chiang
Browse files

Fix memory leak incurred by av1_alloc_txb_buf()

Since alloc_compressor_data() may be called multiple times before
dealloc_compressor_data() is called

The av1_alloc_txb_buf() called by alloc_compressor_data() should
free the txb_buf before allocating new txb_buf

Change-Id: I0fe15de771e0669ec3521e5aac322f5cedfd67a9
parent 388947bc
......@@ -42,6 +42,7 @@ void av1_alloc_txb_buf(AV1_COMP *cpi) {
int size = ((cm->mi_rows >> MAX_MIB_SIZE_LOG2) + 1) *
((cm->mi_cols >> MAX_MIB_SIZE_LOG2) + 1);
// TODO(jingning): This should be further reduced.
CHECK_MEM_ERROR(cm, cpi->coeff_buffer_base,
aom_malloc(sizeof(*cpi->coeff_buffer_base) * size));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment