Fixed a bug in unix/alloc.c.

This commit is contained in:
Pietro Gagliardi 2015-05-07 23:35:43 -04:00
parent f544414299
commit dc7274c067
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}