}
if (ptr->is_allocated)
- {
- if (ptr->root && ptr->root->call_free)
- ptr->root->call_free(ptr->root, ptr);
- else
- free(ptr);
- }
+ ptr->root->call_free(ptr->root, ptr);
else
memset(ptr, 0, sizeof(memcached_server_st));
}
return NULL;
}
- if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
+ if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
{
*error= MEMCACHED_BAD_KEY_PROVIDED;
return NULL;