summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <chris@Burninator.(none)>2007-06-25 16:03:04 +1000
committerChristopher James Halse Rogers <chris@Burninator.(none)>2007-06-25 16:03:04 +1000
commite3f85e9012984ab837c566d75c7fbd0898b0ffcc (patch)
tree3a1273fadaf6e0bc0fe05192c3f75954fc3f57e2
parent01719e061b488c1f066be63705e9fe5d716db808 (diff)
downloadradial-switcher-e3f85e9012984ab837c566d75c7fbd0898b0ffcc.tar.gz
radial-switcher-e3f85e9012984ab837c566d75c7fbd0898b0ffcc.tar.bz2
Recursively destroy in destroyWindowTree(). We don't want to leak
-rw-r--r--src/switcher-util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/switcher-util.c b/src/switcher-util.c
index 63b1619..82afa32 100644
--- a/src/switcher-util.c
+++ b/src/switcher-util.c
@@ -52,6 +52,7 @@ void
destroyWindowList (WindowList *l)
{
free (l->w);
+ free (l);
}
/**
@@ -100,7 +101,12 @@ void
destroyWindowTree (WindowTree *node)
{
destroyWindowList (node->windows);
+ for (int i = 0; i < childrenSize; ++i)
+ {
+ destroyWindowTree (node->children[i]);
+ }
free (node->children);
+ free (node);
}
/**