summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2006-09-08 15:24:23 -0400
committerEamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil>2006-09-08 15:24:23 -0400
commitcec392656cda1c938d5462e1949e6eef489f9168 (patch)
tree8e5886246f48a7c1b97f234a0a42f9a49d9b2a03
parent0fba09cdfcc78161f5c92bef6cca53e5309656bd (diff)
Zero out newly allocated ClientRec structures.
This is required to initialize the devPrivates to a known state.
-rw-r--r--dix/dispatch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index aa67dc43e..7c4d539fa 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3612,8 +3612,13 @@ CloseDownRetainedResources()
}
}
+extern int clientPrivateLen;
+extern unsigned *clientPrivateSizes;
+extern unsigned totalClientSize;
+
void InitClient(ClientPtr client, int i, pointer ospriv)
{
+ bzero(client, totalClientSize);
client->index = i;
client->sequence = 0;
client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
@@ -3664,10 +3669,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
#endif
}
-extern int clientPrivateLen;
-extern unsigned *clientPrivateSizes;
-extern unsigned totalClientSize;
-
int
InitClientPrivates(ClientPtr client)
{