aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Display.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Display.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index c2e131954..9f257e508 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -123,12 +123,12 @@ static enum
} reconnectDisplayState;
int nxagentDefaultVisualIndex;
-Colormap *nxagentDefaultColormaps;
+Colormap *nxagentDefaultColormaps = NULL;
int nxagentNumDefaultColormaps;
-int *nxagentDepths;
+int *nxagentDepths = NULL;
int nxagentNumDepths;
-XPixmapFormatValues *nxagentPixmapFormats;
-XPixmapFormatValues *nxagentRemotePixmapFormats;
+XPixmapFormatValues *nxagentPixmapFormats = NULL;
+XPixmapFormatValues *nxagentRemotePixmapFormats = NULL;
int nxagentNumPixmapFormats;
int nxagentRemoteNumPixmapFormats;
Pixel nxagentBlackPixel;
@@ -2500,6 +2500,25 @@ Bool nxagentReconnectDisplay(void *p0)
}
/*
+ * nxagentPixmapFormats and nxagentRemotePixmapFormats
+ * will be reallocated in nxagentInitPixmapFormats().
+ */
+
+ if (nxagentPixmapFormats != NULL)
+ {
+ XFree(nxagentPixmapFormats);
+
+ nxagentPixmapFormats = NULL;
+ }
+
+ if (nxagentRemotePixmapFormats != NULL)
+ {
+ XFree(nxagentRemotePixmapFormats);
+
+ nxagentRemotePixmapFormats = NULL;
+ }
+
+ /*
* Check if all the required pixmap
* formats are supported.
*/