diff options
author | Arnaud Fontaine <arnau@debian.org> | 2011-12-14 19:04:57 +0900 |
---|---|---|
committer | Arnaud Fontaine <arnau@debian.org> | 2011-12-14 20:08:03 +0900 |
commit | 3dbf96b34c732c74bc96abeb7d371579d20ce56f (patch) | |
tree | e0ca8e9d5c9a4912d73869f6b71dd1ee89a2c65d | |
parent | 8605d0178461b98099c5dee33b19eb8204487487 (diff) |
Free properly memory allocated by XQueryTree().
-rw-r--r-- | transSet.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |