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]]; }