return NULL; /* MEMCACHED_MEMORY_ALLOCATION_FAILURE */
memset(ptr, 0, sizeof(memcached_st));
- ptr->is_allocated= MEMCACHED_ALLOCATED;
+ ptr->is_allocated= true;
}
else
{
free(ptr->continuum);
}
- if (ptr->is_allocated == MEMCACHED_ALLOCATED)
+ if (ptr->is_allocated)
{
if (ptr->call_free)
ptr->call_free(ptr, ptr);
free(ptr);
}
else
- ptr->is_allocated= MEMCACHED_USED;
+ memset(ptr, 0, sizeof(memcached_st));
}
/*
if (source == NULL)
return memcached_create(clone);
- if (clone && clone->is_allocated == MEMCACHED_USED)
+ if (clone && clone->is_allocated)
{
return NULL;
}