From: Brian Aker Date: Wed, 10 Mar 2010 00:45:36 +0000 (-0800) Subject: A couple of valgrind warnings fixes. X-Git-Tag: 0.40~33 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=bba52a77d1893513c325259e52408ae16a511bf0;p=awesomized%2Flibmemcached A couple of valgrind warnings fixes. --- diff --git a/clients/memstat.c b/clients/memstat.c index 6b6c5bcf..db96364e 100644 --- a/clients/memstat.c +++ b/clients/memstat.c @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) memc= memcached_create(NULL); servers= memcached_servers_parse(opt_servers); - memcached_server_push(memc, servers); + rc= memcached_server_push(memc, servers); memcached_server_list_free(servers); if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_SOME_ERRORS) diff --git a/tests/mem_functions.c b/tests/mem_functions.c index 63bdb3d5..9b050560 100644 --- a/tests/mem_functions.c +++ b/tests/mem_functions.c @@ -190,6 +190,7 @@ static test_return_t memcached_server_remove_test(memcached_st *ptr __attribute_ servers= memcached_servers_parse(server_string); rc= memcached_server_push(memc, servers); + memcached_server_list_free(servers); callbacks[0]= server_print_callback; memcached_server_cursor(memc, callbacks, NULL, 1); @@ -2729,6 +2730,8 @@ static test_return_t user_supplied_bug19(memcached_st *not_used) server= memcached_server_by_key(memc, "a", 1, &res); + memcached_free(memc); + return TEST_SUCCESS; }