Clone should also preserve calloc
authorTrond Norbye <trond.norbye@sun.com>
Sun, 14 Jun 2009 12:05:13 +0000 (14:05 +0200)
committerTrond Norbye <trond.norbye@sun.com>
Sun, 14 Jun 2009 12:05:13 +0000 (14:05 +0200)
libmemcached/memcached.c
tests/function.c

index 1e4cc92e7daa9e44a085c01af5d8393ab3915a76..61a3b399239e4e76cb5d4fb992347767b25e3987 100644 (file)
@@ -98,6 +98,7 @@ memcached_st *memcached_clone(memcached_st *clone, memcached_st *source)
   new_clone->call_free= source->call_free;
   new_clone->call_malloc= source->call_malloc;
   new_clone->call_realloc= source->call_realloc;
+  new_clone->call_calloc= source->call_calloc;
   new_clone->get_key_failure= source->get_key_failure;
   new_clone->delete_trigger= source->delete_trigger;
   new_clone->server_failure_limit= source->server_failure_limit;
index 8ab61917587f35aada08cade67f60850cb4e73d0..4b7fbdee15edb3a53d44f1e12b00a800e81e6a7a 100644 (file)
@@ -215,6 +215,7 @@ static test_return  clone_test(memcached_st *memc)
     assert(clone->call_free == memc->call_free);
     assert(clone->call_malloc == memc->call_malloc);
     assert(clone->call_realloc == memc->call_realloc);
+    assert(clone->call_calloc == memc->call_calloc);
     assert(clone->connect_timeout == memc->connect_timeout);
     assert(clone->delete_trigger == memc->delete_trigger);
     assert(clone->distribution == memc->distribution);