--- libaitio/src/Attic/mem.c 2012/05/27 09:57:27 1.1.4.5 +++ libaitio/src/Attic/mem.c 2012/07/25 15:21:59 1.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: mem.c,v 1.1.4.5 2012/05/27 09:57:27 misho Exp $ +* $Id: mem.c,v 1.3 2012/07/25 15:21:59 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -213,8 +213,10 @@ mpool_malloc(mpool_t * __restrict mp, u_int size, cons free(m); mpool_unlock(mp); return NULL; - } else /* quota */ + } else { /* quota */ mp->pool_quota.curr += size; + memset(m->alloc_mem, 0, align + 12); + } } m->alloc_mem[0] = size / sizeof(u_int); @@ -402,7 +404,7 @@ mpool_free(mpool_t * __restrict mp, void * __restrict int idx; struct tagAlloc *m, *tmp; - assert(tmp); + assert(data); if (!mp) { io_SetErr(EINVAL, "Pool not specified"); return -1;