From 53a4eefe2a44a2be1546763750d1ada61b30e08e Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 8 May 2015 10:25:58 -0400 Subject: [PATCH] Fixed a memory leak in ptrarray.c. --- ptrarray.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ptrarray.c b/ptrarray.c index 48924e31..b73fa32a 100644 --- a/ptrarray.c +++ b/ptrarray.c @@ -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); }