Fixed a memory leak in ptrarray.c.

This commit is contained in:
Pietro Gagliardi 2015-05-08 10:25:58 -04:00
parent 5cf19dcc17
commit 53a4eefe2a
1 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,8 @@ void ptrArrayDestroy(struct ptrArray *p)
{
if (p->len != 0)
complain("attempt to destroy ptrarray %p while it still has pointers inside", p);
if (p->ptrs != NULL) // array was created but nothing was ever put inside
uiFree(p->ptrs);
uiFree(p);
}