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