From dfffcee4439084f9afbdc39ce894cca62804d2c0 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Tue, 20 Aug 2013 21:38:19 +0100 Subject: [PATCH] replace malloc in session/session.c with quick fit approach. --- src/session/session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/session/session.c b/src/session/session.c index b768da4..512be4b 100644 --- a/src/session/session.c +++ b/src/session/session.c @@ -45,7 +45,7 @@ sessionCtor(void * _this, va_list * params) this->livetime = time(NULL) + SESSION_LIVETIME; this->id = sdbm((unsigned char *)uname, nuname) ^ this->livetime; - this->username = malloc(nuname + 1); + this->username = memMalloc(nuname + 1); this->username[nuname] = 0; memcpy(this->username, uname, nuname); @@ -58,7 +58,7 @@ sessionDtor(void * _this) { Session this = _this; - FREE(this->username); + MEM_FREE(this->username); } INIT_IFACE(Class, sessionCtor, sessionDtor, NULL);