aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}