From 53a55eacddac88ffa3e14125d8f3491147291fdc Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Tue, 10 Nov 2015 23:38:27 -0500 Subject: [PATCH] umalloc: poison frees --- umalloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/umalloc.c b/umalloc.c index a7e7d2c..ee339d5 100644 --- a/umalloc.c +++ b/umalloc.c @@ -30,6 +30,7 @@ free(void *ap) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; + memset(ap, 0xDE, bp->s.size); if(bp + bp->s.size == p->s.ptr){ bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; -- 2.50.1