Fix for memory leak when parsing servers.
[awesomized/libmemcached] / libmemcached / server_list.c
index c20f8dbf9b775679131a5db0c4473d44d5682462..64b8b0c4c83ed101c0cdac2198f8863dccb882a1 100644 (file)
@@ -42,9 +42,12 @@ memcached_server_list_append_with_weight(memcached_server_list_st ptr,
     return NULL;
   }
 
-  /* TODO: Check return type */
+  /* @todo Check return type */
   memcached_server_create_with(NULL, &new_host_list[count-1], hostname, port, weight, MEMCACHED_CONNECTION_TCP);
 
+  // Handset allocated since 
+  new_host_list->options.is_allocated= true;
+
   /* Backwards compatibility hack */
   memcached_servers_set_count(new_host_list, count);