X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fresult.cc;h=851337f30facf159c5fe0b59fbbd43587f44bc30;hb=9fd31c03436acf24c593dc3a77c905eb137ef570;hp=f9d55a9412c1087d6ca0a0e0a2407b301aa8bf92;hpb=f0b9c972a973d997db6660680938dd5acb2baa46;p=awesomized%2Flibmemcached diff --git a/libmemcached/result.cc b/libmemcached/result.cc index f9d55a94..851337f3 100644 --- a/libmemcached/result.cc +++ b/libmemcached/result.cc @@ -52,6 +52,7 @@ static inline void _result_init(memcached_result_st *self, self->key_length= 0; self->item_cas= 0; self->root= memc; + self->count= 0; self->item_key[0]= 0; } @@ -69,8 +70,10 @@ memcached_result_st *memcached_result_create(const memcached_st *memc, { ptr= static_cast(libmemcached_malloc(memc, sizeof(memcached_result_st))); - if (ptr == NULL) + if (not ptr) + { return NULL; + } ptr->options.is_allocated= true; } @@ -110,6 +113,7 @@ void memcached_result_free(memcached_result_st *ptr) } else { + ptr->count= 0; ptr->options.is_initialized= false; } }