stats= ptr->call_calloc(ptr, ptr->number_of_hosts, sizeof(memcached_stat_st));
+ stats->root= ptr;
+
if (!stats)
{
*error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
return;
}
- if (ptr)
+ if (memc_stat->root)
+ {
+ memc_stat->root->call_free(ptr, memc_stat);
+ }
+ else if (ptr)
+ {
ptr->call_free(ptr, memc_stat);
+ }
else
+ {
free(memc_stat);
+ }
}