Simple addition to valgrind test.
[awesomized/libmemcached] / tests / libmemcached_world.h
index b608d9ae953294824ef558d06c13d48b5e15f3bc..4793569c1e14b56165ad110b7e44df961a322f30 100644 (file)
@@ -96,7 +96,7 @@ test_return_t world_flush(libmemcached_test_container_st *container)
 
 test_return_t world_pre_run(libmemcached_test_container_st *container)
 {
-  for (uint32_t loop= 0; loop < memcached_server_list_count(container->construct.servers); loop++)
+  for (uint32_t loop= 0; loop < memcached_server_list_count(container->memc->servers); loop++)
   {
     memcached_server_instance_st instance=
       memcached_server_instance_by_position(container->memc, loop);
@@ -133,6 +133,10 @@ test_return_t world_destroy(libmemcached_test_container_st *container)
 
   server_shutdown(construct);
 
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+  sasl_done();
+#endif
+
   return TEST_SUCCESS;
 }