From d738398aab9d64f071c2bc13375451aa0682e1e2 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Tue, 20 Aug 2013 21:17:10 +0100 Subject: [PATCH] replace calloc in http/cookie.c with quick fit approach. --- src/http/header.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/http/header.c b/src/http/header.c index 42ecfd9..103d024 100644 --- a/src/http/header.c +++ b/src/http/header.c @@ -43,13 +43,13 @@ httpHeaderCtor(void * _this, va_list * params) { value = va_arg(* params, char *); this->nvalue[0] = va_arg(* params, size_t); - this->name = malloc(this->nname + 1); + this->name = memMalloc(this->nname + 1); this->name[this->nname] = 0; memcpy(this->name, name, this->nname); this->hash = sdbm((unsigned char *)name, this->nname); - (this->value)[0] = malloc((this->nvalue)[0] + 1); + (this->value)[0] = memMalloc((this->nvalue)[0] + 1); (this->value)[0][(this->nvalue)[0]] = 0; memcpy((this->value)[0], value, (this->nvalue)[0]); this->cvalue = 1; @@ -65,10 +65,10 @@ httpHeaderDtor(void * _this) HttpHeader this = _this; size_t i; - FREE(this->name); + MEM_FREE(this->name); for (i=0; icvalue; i++) { - FREE(this->value[i]); + MEM_FREE(this->value[i]); } }