Commit 5ad0b4dd authored by Ulrich Sibiller's avatar Ulrich Sibiller

Window.c: check for malloc failure

PVS finding: "V522 There might be dereferencing of a potential null pointer 'nxagentConfiguredWindowList'."
parent 6214c71b
......@@ -3659,6 +3659,14 @@ void nxagentAddStaticResizedWindow(WindowPtr pWin, unsigned long sequence, int o
StaticResizedWindowStruct *tmp = nxagentStaticResizedWindowList;
nxagentStaticResizedWindowList = malloc(sizeof(StaticResizedWindowStruct));
if (!nxagentStaticResizedWindowList)
{
#ifdef WARNING
fprintf(stderr, "WARNING: could not allocate memory for nxagentStaticResizedWindowList\n");
#endif
nxagentStaticResizedWindowList = tmp;
return;
}
nxagentStaticResizedWindowList -> next = tmp;
nxagentStaticResizedWindowList -> prev = NULL;
......
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