]> granicus.if.org Git - libx264/commitdiff
Fix theoretically incorrect cost_mv_fpel free
authorAnton Mitrofanov <BugMaster@narod.ru>
Sun, 1 Apr 2018 14:52:47 +0000 (17:52 +0300)
committerHenrik Gramner <henrik@gramner.com>
Sun, 27 May 2018 18:58:54 +0000 (20:58 +0200)
encoder/analyse.c

index c313664debda9d9a68934f41c3fa008c4a01fdd6..e3e51f4f3eeabc1ec838da181d3ea346be838984 100644 (file)
@@ -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 );
+        }
     }
 }