diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-12-07 08:35:54 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-07 08:35:54 +0100 |
commit | eb9618739d0fb99f4aca933750a9d65dbe02aefb (patch) | |
tree | a7d569f7de444d0acd8f4a09334eec35474f20a3 /nx-X11/programs/Xserver/hw/nxagent/Window.c | |
parent | 5487d52fe1c37244c649c3aefb78600f08ffb91b (diff) | |
parent | ad53af097ca5ff3c4687ab7c93f776d482760ae8 (diff) | |
download | nx-libs-eb9618739d0fb99f4aca933750a9d65dbe02aefb.tar.gz nx-libs-eb9618739d0fb99f4aca933750a9d65dbe02aefb.tar.bz2 nx-libs-eb9618739d0fb99f4aca933750a9d65dbe02aefb.zip |
Merge branch 'uli42-p/xquerytree_leak' into 3.6.x
Attributes GH PR #588: https://github.com/ArcticaProject/nx-libs/pull/588
Fixes: ArcticaProject/nx-libs#585
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Window.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 2fa6bc136..1cad4ca03 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -1454,9 +1454,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) { Window root_return; Window parent_return; - Window *children_return; + Window *children_return = NULL; unsigned int nchildren_return; - Window *pw; Status result; result = XQueryTree(nxagentDisplay, DefaultRootWindow(nxagentDisplay), @@ -1464,8 +1463,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) if (result) { - pw = children_return; - fprintf(stderr, "nxagentConfigureWindow: Children of the root: "); while(nchildren_return > 0) { @@ -1476,16 +1473,16 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) } } fprintf(stderr, "\n"); - - if (children_return) - { - XFree(children_return); - } } else { fprintf(stderr, "nxagentConfigureWindow: Failed QueryTree request.\n "); } + + if (children_return) + { + XFree(children_return); + } } #endif } |