From dc7274c0675c9a078f515deb940cc883e833e847 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 7 May 2015 23:35:43 -0400 Subject: [PATCH] Fixed a bug in unix/alloc.c. --- unix/alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unix/alloc.c b/unix/alloc.c index b254ce3d..802f5f20 100644 --- a/unix/alloc.c +++ b/unix/alloc.c @@ -65,7 +65,8 @@ void uiFree(void *p) { if (p == NULL) complain("attempt to uiFree(NULL); there's a bug somewhere"); - g_free(BASE(p)); + p = BASE(p); + g_free(p); if (g_ptr_array_remove(allocations, p) == FALSE) complain("%p not found in allocations array in uiFree()", p); }