From cf89124be53229ccbc9ba676d1edb19720b6b775 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 8 May 2015 18:54:42 -0400 Subject: [PATCH] Fixed allocation tracking on OS X. --- darwin/alloc.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/darwin/alloc.m b/darwin/alloc.m index 0ff9bc57..b20cd538 100644 --- a/darwin/alloc.m +++ b/darwin/alloc.m @@ -78,6 +78,7 @@ void uiFree(void *p) { if (p == NULL) complain("attempt to uiFree(NULL); there's a bug somewhere"); - free(BASE(p)); + p = BASE(p); + free(p); [allocations removeObject:[NSValue valueWithPointer:p]]; }