if (args != NULL)
{
int len= strlen(args);
+
+ rc= memcached_validate_key_length(len, true);
+ unlikely (rc != MEMCACHED_SUCCESS)
+ return rc;
+
request.message.header.request.keylen= htons((uint16_t)len);
request.message.header.request.bodylen= htonl(len);
if (!stats)
{
*error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
- if (ptr->call_free)
- ptr->call_free(ptr, stats);
- else
- free(stats);
-
return NULL;
}
memset(stats, 0, sizeof(memcached_stat_st)*(ptr->number_of_hosts));