diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-12-05 00:29:10 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-07 08:33:44 +0100 |
commit | cdaec755d8800d3cb78e3d7c65b4320c067e27cf (patch) | |
tree | b5cf54e6114bbee8616a02d1cde662819a2b8679 /nx-X11/programs/Xserver/hw/nxagent/Window.c | |
parent | 0938cf83d37407267e17a2620da8ce1fc8264be8 (diff) | |
download | nx-libs-cdaec755d8800d3cb78e3d7c65b4320c067e27cf.tar.gz nx-libs-cdaec755d8800d3cb78e3d7c65b4320c067e27cf.tar.bz2 nx-libs-cdaec755d8800d3cb78e3d7c65b4320c067e27cf.zip |
Make sure XQueryTree results are freed
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 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 849317f25..1cad4ca03 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -1454,7 +1454,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) { Window root_return; Window parent_return; - Window *children_return; + Window *children_return = NULL; unsigned int nchildren_return; Status result; @@ -1473,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 } |