From: Brian Aker Date: Sun, 27 Mar 2011 15:48:46 +0000 (-0700) Subject: Merge in fixes for test which leaked memory. X-Git-Tag: 0.51~15^2~68 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=dc958dcf872470599504753f7441019fd0b603f2;p=awesomized%2Flibmemcached Merge in fixes for test which leaked memory. --- diff --git a/support/libmemcached.spec.in b/support/libmemcached.spec.in index d297c01f..98f21a31 100644 --- a/support/libmemcached.spec.in +++ b/support/libmemcached.spec.in @@ -137,6 +137,7 @@ you will need to install %{name}-devel. %{_includedir}/libmemcached/options.h %{_includedir}/libmemcached/parse.h %{_includedir}/libmemcached/platform.h +%{_includedir}/libmemcached/prefix_key.h %{_includedir}/libmemcached/protocol/cache.h %{_includedir}/libmemcached/protocol/callback.h %{_includedir}/libmemcached/protocol_handler.h diff --git a/tests/mem_functions.c b/tests/mem_functions.c index 93722602..4b588431 100644 --- a/tests/mem_functions.c +++ b/tests/mem_functions.c @@ -5615,6 +5615,7 @@ static test_return_t wrong_failure_counter_two_test(memcached_st *memc) test_true_got(rc == MEMCACHED_SUCCESS, memcached_strerror(NULL, rc)); test_true(string); free(string); + memcached_free(memc_clone); return TEST_SUCCESS; } diff --git a/tests/parser.cc b/tests/parser.cc index d559b84d..40904a08 100644 --- a/tests/parser.cc +++ b/tests/parser.cc @@ -521,11 +521,10 @@ test_return_t random_statement_build_test(memcached_st *junk) random_options+= option_list[random() % option_list.size()]->c_str; random_options+= " "; } - random_options.resize(random_options.size() -1); memcached_return_t rc; memcached_st *memc_ptr= memcached_create(NULL); - rc= memcached_parse_configuration(memc_ptr, random_options.c_str(), random_options.size()); + rc= memcached_parse_configuration(memc_ptr, random_options.c_str(), random_options.size() -1); if (rc == MEMCACHED_PARSE_ERROR) { std::cerr << std::endl << "Failed to parse(" << memcached_strerror(NULL, rc) << "): " << random_options << std::endl;