aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Reconnect.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index d0f83e7bd..e6d3ce6ec 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -788,12 +788,16 @@ void nxagentSetReconnectError(int id, char *format, ...)
size = (size ? size * 2 : NXAGENT_RECONNECT_DEFAULT_MESSAGE_SIZE);
}
- nxagentReconnectErrorMessage = realloc(nxagentReconnectErrorMessage, size);
+ char *tmp = realloc(nxagentReconnectErrorMessage, size);
- if (nxagentReconnectErrorMessage == NULL)
+ if (tmp == NULL)
{
FatalError("realloc failed");
}
+ else
+ {
+ nxagentReconnectErrorMessage = tmp;
+ }
}
return;