From: Anton Mitrofanov Date: Sun, 1 Apr 2018 14:52:47 +0000 (+0300) Subject: Fix theoretically incorrect cost_mv_fpel free X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6afb67c6d7b71fcc6fc14d167f1fcf55623846f4;p=libx264 Fix theoretically incorrect cost_mv_fpel free --- diff --git a/encoder/analyse.c b/encoder/analyse.c index c313664d..e3e51f4f 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -208,9 +208,11 @@ void x264_analyse_free_costs( x264_t *h ) { if( h->cost_mv[i] ) x264_free( h->cost_mv[i] - 2*4*mv_range ); - if( h->cost_mv_fpel[i][0] ) - for( int j = 0; j < 4; j++ ) + for( int j = 0; j < 4; j++ ) + { + if( h->cost_mv_fpel[i][j] ) x264_free( h->cost_mv_fpel[i][j] - 2*mv_range ); + } } }