*error= MEMCACHED_SUCCESS;
server_count= memcached_server_count(memc);
- result= (memcached_analysis_st*)calloc(1, sizeof(memcached_analysis_st)
- * (memc->number_of_hosts));
+ result= (memcached_analysis_st*)calloc(memc->number_of_hosts,
+ sizeof(memcached_analysis_st));
+
if (!result)
{
*error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;