Updating to remove memory leak in functions.c (aka test cases).
[awesomized/libmemcached] / lib / memcached.c
index 591bf1f669cf8574e2c5c03bda3f5198ff55b7f8..30099c39ff7a2f643f2edd9caaaddb0ee5b0d979 100644 (file)
@@ -22,8 +22,8 @@ memcached_st *memcached_create(memcached_st *ptr)
   }
   string_ptr= memcached_string_create(ptr, &ptr->result_buffer, 0);
   WATCHPOINT_ASSERT(string_ptr);
-  ptr->poll_timeout= -1;
-  ptr->distribution= MEMCACHED_DISTRIBUTION_MODULO;
+  ptr->poll_timeout= MEMCACHED_DEFAULT_TIMEOUT;
+  ptr->distribution= MEMCACHED_DISTRIBUTION_MODULA;
 
   return ptr;
 }
@@ -81,6 +81,7 @@ memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr)
   new_clone->recv_size= ptr->recv_size;
   new_clone->poll_timeout= ptr->poll_timeout;
   new_clone->distribution= ptr->distribution;
+  new_clone->hash= ptr->hash;
 
   return new_clone;
 }