From efebe7d7b92678bfd9dacbf22068387aeff3da07 Mon Sep 17 00:00:00 2001 From: Fiona Glaser Date: Sat, 8 Aug 2009 17:51:01 -0700 Subject: [PATCH] Add missing free()s for new data allocated for MB-tree Eliminates a memory leak. --- common/frame.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/frame.c b/common/frame.c index e81f6239..b642717d 100644 --- a/common/frame.c +++ b/common/frame.c @@ -174,6 +174,13 @@ void x264_frame_delete( x264_frame_t *frame ) x264_free( frame->lowres_mvs[j][i] ); x264_free( frame->lowres_mv_costs[j][i] ); } + x264_free( frame->i_propagate_cost ); + for( j = 0; j <= X264_BFRAME_MAX+1; j++ ) + for( i = 0; i <= X264_BFRAME_MAX+1; i++ ) + { + x264_free( frame->lowres_costs[j][i] ); + x264_free( frame->lowres_inter_types[j][i] ); + } x264_free( frame->f_qp_offset ); x264_free( frame->i_inv_qscale_factor ); x264_free( frame->i_intra_cost ); -- 2.40.0