From: Johann Date: Tue, 25 Nov 2014 20:06:56 +0000 (-0800) Subject: Remove unfreed memory in quantize_test.cc X-Git-Tag: v1.4.0~458 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee30dd000ce13fe78351022b9b2b701b109e2c72;p=libvpx Remove unfreed memory in quantize_test.cc vp8_config doesn't need to be on the stack. Just use a local copy. Change-Id: Ia241b1d87fd9422556d957f3ea43ad71eb5c414a --- diff --git a/test/quantize_test.cc b/test/quantize_test.cc index 329227b6b..53b36f3ef 100644 --- a/test/quantize_test.cc +++ b/test/quantize_test.cc @@ -55,10 +55,10 @@ class QuantizeTestBase { rnd_.Reset(ACMRandom::DeterministicSeed()); // The full configuration is necessary to generate the quantization tables. - VP8_CONFIG *const vp8_config = - reinterpret_cast(vpx_calloc(sizeof(*vp8_config), 1)); + VP8_CONFIG vp8_config; + vpx_memset(&vp8_config, 0, sizeof(vp8_config)); - vp8_comp_ = vp8_create_compressor(vp8_config); + vp8_comp_ = vp8_create_compressor(&vp8_config); // Set the tables based on a quantizer of 0. vp8_set_quantizer(vp8_comp_, 0);