aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-07-22 18:10:12 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-08-06 21:57:32 +0200
commitebc2ea79f7343c4ced8277b80178091a3226ea72 (patch)
tree229a1338a70838fb2f0329ea9da1a60307dba6d9 /nx-X11/programs/Xserver
parentb8411180ed1f3567ab5ca11d70834907fc54d711 (diff)
downloadnx-libs-ebc2ea79f7343c4ced8277b80178091a3226ea72.tar.gz
nx-libs-ebc2ea79f7343c4ced8277b80178091a3226ea72.tar.bz2
nx-libs-ebc2ea79f7343c4ced8277b80178091a3226ea72.zip
Events.c: safe some lines by calling SAFE_XFree
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index d8bf4df60..74781f638 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -329,7 +329,7 @@ void nxagentRemoteWindowID(Window window, Bool newline)
else if (winName)
{
fprintf(stderr, " \"%s\" ", winName);
- XFree(winName);
+ SAFE_XFree(winName);
}
#else
@@ -477,10 +477,7 @@ void nxagentRemoteWindowsTree(Window window, int level)
nxagentRemoteWindowsTree(childList[i], level + 1);
}
- if (childList)
- {
- XFree((char *) childList);
- }
+ SAFE_XFree((char *) childList);
}
#endif
@@ -3128,10 +3125,7 @@ int nxagentCheckWindowConfiguration(XConfigureEvent* X)
#endif
}
- if (children_return)
- {
- XFree(children_return);
- }
+ SAFE_XFree(children_return);
#if 0
fprintf(stderr, "nxagentCheckWindowConfiguration: Trees match: %s\n",
@@ -3513,11 +3507,7 @@ int nxagentHandleReparentNotify(XEvent* X)
result = XQueryTree(nxagentDisplay, w, &root_return,
&parent_return, &children_return, &nchildren_return);
- if (children_return)
- {
- XFree(children_return);
- children_return = NULL;
- }
+ SAFE_XFree(children_return);
if (!result)
{
@@ -3555,11 +3545,7 @@ int nxagentHandleReparentNotify(XEvent* X)
#endif
}
- if (children_return)
- {
- XFree(children_return);
- children_return = NULL;
- }
+ SAFE_XFree(children_return);
}
else
{
@@ -3623,11 +3609,7 @@ int nxagentHandleReparentNotify(XEvent* X)
result = XQueryTree(nxagentDisplay, w, &rootReturn, &parentReturn,
&childrenReturn, &nchildrenReturn);
- if (childrenReturn)
- {
- XFree(childrenReturn);
- childrenReturn = NULL;
- }
+ SAFE_XFree(childrenReturn);
if (parentReturn == rootReturn || parentReturn == 0 || result == 0)
{
@@ -4024,10 +4006,7 @@ void nxagentHandleCollectPropertyEvent(XEvent *X)
#endif
}
- if (pszReturnData != NULL)
- {
- XFree(pszReturnData);
- }
+ SAFE_XFree(pszReturnData);
return;
}