fix a memleak in cqm
authorLoren Merritt <pengvado@videolan.org>
Sun, 27 Jan 2008 11:50:50 +0000 (11:50 +0000)
committerLoren Merritt <pengvado@videolan.org>
Sun, 27 Jan 2008 11:50:50 +0000 (11:50 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@730 df754926-b1dd-0310-bc7b-ec298dee348c

common/set.c

index e49de9b..c08bcee 100644 (file)
@@ -189,6 +189,11 @@ void x264_cqm_delete( x264_t *h )
             x264_free( h->dequant4_mf[i] );
             x264_free( h->unquant4_mf[i] );
         }
+        for( j = 0; j < i; j++ )
+            if( h->quant4_bias[i] == h->quant4_bias[j] )
+                break;
+        if( j == i )
+            x264_free( h->quant4_bias[i] );
     }
 }