Partial backport of ddb8d8945d1f44d16 for valgrind cleanliness
This commit is contained in:
parent
ed9ebc423a
commit
4402a80630
@ -88,6 +88,7 @@ ClientPtr client;
|
||||
return BadRequest;
|
||||
REQUEST_SIZE_MATCH(xBigReqEnableReq);
|
||||
client->big_requests = TRUE;
|
||||
memset(&rep, 0, sizeof(xBigReqEnableReply));
|
||||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
|
@ -303,6 +303,7 @@ ClientPtr client;
|
||||
xShapeQueryVersionReply rep;
|
||||
|
||||
REQUEST_SIZE_MATCH(xShapeQueryVersionReq);
|
||||
memset(&rep, 0, sizeof(xShapeQueryVersionReply));
|
||||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
|
@ -324,6 +324,7 @@ ClientPtr client;
|
||||
|
||||
|
||||
REQUEST_SIZE_MATCH(xShmQueryVersionReq);
|
||||
memset(&rep, 0, sizeof(xShmQueryVersionReply));
|
||||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
|
@ -1319,6 +1319,7 @@ ClientPtr client;
|
||||
|
||||
REQUEST_SIZE_MATCH(xSyncInitializeReq);
|
||||
|
||||
memset(&rep, 0, sizeof(xSyncInitializeReply));
|
||||
rep.type = X_Reply;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.majorVersion = SYNC_MAJOR_VERSION;
|
||||
|
@ -807,6 +807,7 @@ ProcGetModifierMapping(ClientPtr client)
|
||||
KeyClassPtr keyc = inputInfo.keyboard->key;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
memset(&rep, 0, sizeof(xGetModifierMappingReply));
|
||||
rep.type = X_Reply;
|
||||
rep.numKeyPerModifier = keyc->maxKeysPerModifier;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
@ -920,6 +921,7 @@ ProcGetKeyboardMapping(ClientPtr client)
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
memset(&rep, 0, sizeof(xGetKeyboardMappingReply));
|
||||
rep.type = X_Reply;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.keySymsPerKeyCode = curKeySyms->mapWidth;
|
||||
|
@ -555,6 +555,7 @@ ProcGetWindowAttributes(register ClientPtr client)
|
||||
SecurityReadAccess);
|
||||
if (!pWin)
|
||||
return (BadWindow);
|
||||
memset(&wa, 0, sizeof(xGetWindowAttributesReply));
|
||||
GetWindowAttributes(pWin, client, &wa);
|
||||
WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa);
|
||||
return (client->noClientException);
|
||||
@ -817,6 +818,7 @@ ProcGetGeometry(register ClientPtr client)
|
||||
|
||||
int status;
|
||||
|
||||
memset(&rep, 0, sizeof(xGetGeometryReply));
|
||||
if ((status = GetGeometry(client, &rep)) != Success)
|
||||
return status;
|
||||
|
||||
@ -842,6 +844,7 @@ ProcQueryTree(register ClientPtr client)
|
||||
SecurityReadAccess);
|
||||
if (!pWin)
|
||||
return (BadWindow);
|
||||
memset(&reply, 0, sizeof(xQueryTreeReply));
|
||||
reply.type = X_Reply;
|
||||
reply.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id;
|
||||
reply.sequenceNumber = client->sequence;
|
||||
@ -896,6 +899,7 @@ ProcInternAtom(register ClientPtr client)
|
||||
if (atom != BAD_RESOURCE) {
|
||||
xInternAtomReply reply = {0};
|
||||
|
||||
memset(&reply, 0, sizeof(xInternAtomReply));
|
||||
reply.type = X_Reply;
|
||||
reply.length = 0;
|
||||
reply.sequenceNumber = client->sequence;
|
||||
@ -921,6 +925,7 @@ ProcGetAtomName(register ClientPtr client)
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
if ((str = NameForAtom(stuff->id))) {
|
||||
len = strlen(str);
|
||||
memset(&reply, 0, sizeof(xGetAtomNameReply));
|
||||
reply.type = X_Reply;
|
||||
reply.length = (len + 3) >> 2;
|
||||
reply.sequenceNumber = client->sequence;
|
||||
@ -1194,6 +1199,7 @@ ProcTranslateCoords(register ClientPtr client)
|
||||
SecurityReadAccess);
|
||||
if (!pDst)
|
||||
return (BadWindow);
|
||||
memset(&rep, 0, sizeof(xTranslateCoordsReply));
|
||||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
@ -1332,7 +1338,7 @@ ProcQueryFont(register ClientPtr client)
|
||||
rlength = sizeof(xQueryFontReply) +
|
||||
FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) +
|
||||
nprotoxcistructs * sizeof(xCharInfo);
|
||||
reply = (xQueryFontReply *) ALLOCATE_LOCAL(rlength);
|
||||
reply = (xQueryFontReply *) calloc(1, rlength);
|
||||
if (!reply) {
|
||||
return (BadAlloc);
|
||||
}
|
||||
@ -1343,7 +1349,7 @@ ProcQueryFont(register ClientPtr client)
|
||||
QueryFont(pFont, reply, nprotoxcistructs);
|
||||
|
||||
WriteReplyToClient(client, rlength, reply);
|
||||
DEALLOCATE_LOCAL(reply);
|
||||
free(reply);
|
||||
return (client->noClientException);
|
||||
}
|
||||
}
|
||||
@ -2104,6 +2110,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
||||
return (BadValue);
|
||||
}
|
||||
SECURITY_VERIFY_DRAWABLE(pDraw, drawable, client, SecurityReadAccess);
|
||||
memset(&xgi, 0, sizeof(xGetImageReply));
|
||||
if (pDraw->type == DRAWABLE_WINDOW) {
|
||||
if ( /* check for being viewable */
|
||||
!((WindowPtr) pDraw)->realized ||
|
||||
|
@ -782,6 +782,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
|
||||
for (i = 0; i < nnames; i++)
|
||||
stringLens += (names->length[i] <= 255) ? names->length[i] : 0;
|
||||
|
||||
memset(&reply, 0, sizeof(xListFontsReply));
|
||||
reply.type = X_Reply;
|
||||
reply.length = (stringLens + nnames + 3) >> 2;
|
||||
reply.nFonts = nnames;
|
||||
@ -1028,6 +1029,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
|
||||
err = AllocError;
|
||||
goto bail;
|
||||
}
|
||||
memset(reply + c->length, 0, length - c->length);
|
||||
c->reply = reply;
|
||||
c->length = length;
|
||||
}
|
||||
|
@ -2879,6 +2879,7 @@ ProcQueryPointer(ClientPtr client)
|
||||
return BadWindow;
|
||||
if (mouse->valuator->motionHintWindow)
|
||||
MaybeStopHint(mouse, client);
|
||||
memset(&rep, 0, sizeof(xQueryPointerReply));
|
||||
rep.type = X_Reply;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.mask = mouse->button->state | inputInfo.keyboard->key->state;
|
||||
|
Loading…
x
Reference in New Issue
Block a user