void memcached_deinit(memcached_st *ptr)
{
unsigned int x;
- memcached_host_st *host_ptr;
if (ptr->hosts)
{
for (x= 0; x < ptr->number_of_hosts; x++)
{
- if (ptr->hosts[x].fd == -1)
+ if (ptr->hosts[x].fd > 0)
close(ptr->hosts[x].fd);
+
free(ptr->hosts[x].hostname);
}