summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Fontaine <arnau@debian.org>2011-12-14 19:04:57 +0900
committerArnaud Fontaine <arnau@debian.org>2011-12-14 20:08:03 +0900
commit3dbf96b34c732c74bc96abeb7d371579d20ce56f (patch)
treee0ca8e9d5c9a4912d73869f6b71dd1ee89a2c65d
parent8605d0178461b98099c5dee33b19eb8204487487 (diff)
Free properly memory allocated by XQueryTree().
-rw-r--r--transSet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/transSet.c b/transSet.c
index b44c392..3b62508 100644
--- a/transSet.c
+++ b/transSet.c
@@ -81,6 +81,7 @@ Get_Top_Window (Display *dpy, Window child) {
&num_children))
Fatal_Error ("Can't query window tree.");
+ XFree ((void *) child_list);
if (parent == root)
return child;
@@ -89,7 +90,7 @@ Get_Top_Window (Display *dpy, Window child) {
if (!XQueryTree (dpy, child, &root, &parent, &child_list,
&num_children))
Fatal_Error ("Can't query window tree.");
-
+ XFree ((void *) child_list);
}
return child;
}