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) ...@@ -329,7 +329,7 @@ void nxagentRemoteWindowID(Window window, Bool newline)
else if (winName) else if (winName)
{ {
fprintf(stderr, " \"%s\" ", winName); fprintf(stderr, " \"%s\" ", winName);
XFree(winName); SAFE_XFree(winName);
} }
#else #else
...@@ -477,10 +477,7 @@ void nxagentRemoteWindowsTree(Window window, int level) ...@@ -477,10 +477,7 @@ void nxagentRemoteWindowsTree(Window window, int level)
nxagentRemoteWindowsTree(childList[i], level + 1); nxagentRemoteWindowsTree(childList[i], level + 1);
} }
if (childList) SAFE_XFree((char *) childList);
{
XFree((char *) childList);
}
} }
#endif #endif
...@@ -3128,10 +3125,7 @@ int nxagentCheckWindowConfiguration(XConfigureEvent* X) ...@@ -3128,10 +3125,7 @@ int nxagentCheckWindowConfiguration(XConfigureEvent* X)
#endif #endif
} }
if (children_return) SAFE_XFree(children_return);
{
XFree(children_return);
}
#if 0 #if 0
fprintf(stderr, "nxagentCheckWindowConfiguration: Trees match: %s\n", fprintf(stderr, "nxagentCheckWindowConfiguration: Trees match: %s\n",
...@@ -3513,11 +3507,7 @@ int nxagentHandleReparentNotify(XEvent* X) ...@@ -3513,11 +3507,7 @@ int nxagentHandleReparentNotify(XEvent* X)
result = XQueryTree(nxagentDisplay, w, &root_return, result = XQueryTree(nxagentDisplay, w, &root_return,
&parent_return, &children_return, &nchildren_return); &parent_return, &children_return, &nchildren_return);
if (children_return) SAFE_XFree(children_return);
{
XFree(children_return);
children_return = NULL;
}
if (!result) if (!result)
{ {
...@@ -3555,11 +3545,7 @@ int nxagentHandleReparentNotify(XEvent* X) ...@@ -3555,11 +3545,7 @@ int nxagentHandleReparentNotify(XEvent* X)
#endif #endif
} }
if (children_return) SAFE_XFree(children_return);
{
XFree(children_return);
children_return = NULL;
}
} }
else else
{ {
...@@ -3623,11 +3609,7 @@ int nxagentHandleReparentNotify(XEvent* X) ...@@ -3623,11 +3609,7 @@ int nxagentHandleReparentNotify(XEvent* X)
result = XQueryTree(nxagentDisplay, w, &rootReturn, &parentReturn, result = XQueryTree(nxagentDisplay, w, &rootReturn, &parentReturn,
&childrenReturn, &nchildrenReturn); &childrenReturn, &nchildrenReturn);
if (childrenReturn) SAFE_XFree(childrenReturn);
{
XFree(childrenReturn);
childrenReturn = NULL;
}
if (parentReturn == rootReturn || parentReturn == 0 || result == 0) if (parentReturn == rootReturn || parentReturn == 0 || result == 0)
{ {
...@@ -4024,10 +4006,7 @@ void nxagentHandleCollectPropertyEvent(XEvent *X) ...@@ -4024,10 +4006,7 @@ void nxagentHandleCollectPropertyEvent(XEvent *X)
#endif #endif
} }
if (pszReturnData != NULL) SAFE_XFree(pszReturnData);
{
XFree(pszReturnData);
}
return; 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