Commit ebc2ea79 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Events.c: safe some lines by calling SAFE_XFree

parent b8411180
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment