From 672515ae85aeb9be03e0171992bfd05efa1d7c63 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Tue, 20 Aug 2013 20:58:29 +0100 Subject: [PATCH] replace calloc in hash/value.c with quick fit approach --- src/hash/value.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hash/value.c b/src/hash/value.c index c32b760..77ffe1e 100644 --- a/src/hash/value.c +++ b/src/hash/value.c @@ -45,14 +45,14 @@ hashValueCtor(void * _this, va_list * params) value = va_arg(* params, void*); this->nvalue = va_arg(* params, size_t); - this->key = malloc(this->nkey + 1); + this->key = memMalloc(this->nkey + 1); this->key[this->nkey] = 0; memcpy(this->key, key, this->nkey); this->hash = sdbm((unsigned char *)this->key, this->nkey); if (NULL != value) { - this->value = malloc(this->nvalue + 1); + this->value = memMalloc(this->nvalue + 1); ((char*)this->value)[this->nvalue] = 0; memcpy(this->value, value, this->nvalue); } @@ -66,8 +66,8 @@ hashValueDtor(void * _this) { HashValue this = _this; - FREE(this->key); - FREE(this->value); + MEM_FREE(this->key); + MEM_FREE(this->value); } static