Fix for valgrind issue around memcached_result_st not being free()
[m6w6/libmemcached] / tests / libmemcached-1.0 / mem_functions.cc
index 2f1dff722e0cc0a5f157b56908d66aa511e42a81..f8ac3da67ce8a15482bd91dfa13115ff913c9cb1 100644 (file)
@@ -4606,7 +4606,7 @@ test_return_t regression_994772_TEST(memcached_st* memc)
                memcached_mget(memc, keys, key_length, 1));
 
   memcached_return_t rc;
-  memcached_result_st *results = memcached_fetch_result(memc, NULL, &rc);
+  memcached_result_st *results= memcached_fetch_result(memc, NULL, &rc);
   test_true(results);
   test_compare(MEMCACHED_SUCCESS, rc);
 
@@ -4614,6 +4614,8 @@ test_return_t regression_994772_TEST(memcached_st* memc)
   uint64_t cas_value= memcached_result_cas(results);
   test_true(cas_value);
 
+  memcached_result_free(results);
+
   // Bad cas value, sanity check 
   test_true(cas_value != 9999);
   test_compare(MEMCACHED_END,