diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-11-05 19:08:36 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-11-05 19:08:36 -0500 |
commit | a52c9b2a59f27266557ff9d5d2c08492e04135a6 (patch) | |
tree | 705f11c54e8a31a07dde9ab6835032e2849e132b /Xext | |
parent | c7e18beb3c87eb1ada9b21c4ffacd11c1939c087 (diff) | |
parent | 58332894c061ae96d6a457f65266660f5f65e88b (diff) |
Merge branch 'master' into XACE-SELINUX
Conflicts:
dix/dispatch.c
dix/property.c
hw/xfree86/common/xf86VidMode.c
include/xkbsrv.h
render/glyph.c
xkb/xkbActions.c
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/mbuf.c | 45 | ||||
-rw-r--r-- | Xext/mbufbf.c | 4 | ||||
-rw-r--r-- | Xext/mbufpx.c | 9 | ||||
-rw-r--r-- | Xext/panoramiXprocs.c | 32 | ||||
-rw-r--r-- | Xext/saver.c | 4 | ||||
-rw-r--r-- | Xext/shape.c | 6 | ||||
-rw-r--r-- | Xext/shm.c | 5 | ||||
-rw-r--r-- | Xext/sync.c | 12 | ||||
-rw-r--r-- | Xext/xace.c | 4 | ||||
-rw-r--r-- | Xext/xf86bigfont.c | 18 | ||||
-rw-r--r-- | Xext/xres.c | 8 |
11 files changed, 75 insertions, 72 deletions
diff --git a/Xext/mbuf.c b/Xext/mbuf.c index 701af66a4..ba99f3fbc 100644 --- a/Xext/mbuf.c +++ b/Xext/mbuf.c @@ -436,7 +436,7 @@ CreateImageBuffers (pWin, nbuf, ids, action, hint) pMultibuffer->pMultibuffers = pMultibuffers; if (!AddResource (ids[i], MultibufferResType, (pointer) pMultibuffer)) break; - pMultibuffer->pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, depth); + pMultibuffer->pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, depth, 0); if (!pMultibuffer->pPixmap) break; if (!AddResource (ids[i], MultibufferDrawableResType, (pointer) pMultibuffer->pPixmap)) @@ -557,12 +557,12 @@ ProcDisplayImageBuffers (client) return Success; minDelay = stuff->minDelay; ids = (XID *) &stuff[1]; - ppMultibuffers = (MultibuffersPtr *) ALLOCATE_LOCAL(nbuf * sizeof (MultibuffersPtr)); - pMultibuffer = (MultibufferPtr *) ALLOCATE_LOCAL(nbuf * sizeof (MultibufferPtr)); + ppMultibuffers = (MultibuffersPtr *) xalloc(nbuf * sizeof (MultibuffersPtr)); + pMultibuffer = (MultibufferPtr *) xalloc(nbuf * sizeof (MultibufferPtr)); if (!ppMultibuffers || !pMultibuffer) { - if (ppMultibuffers) DEALLOCATE_LOCAL(ppMultibuffers); - if (pMultibuffer) DEALLOCATE_LOCAL(pMultibuffer); + if (ppMultibuffers) xfree(ppMultibuffers); + if (pMultibuffer) xfree(pMultibuffer); client->errorValue = 0; return BadAlloc; } @@ -574,8 +574,8 @@ ProcDisplayImageBuffers (client) MultibufferResType); if (!pMultibuffer[i]) { - DEALLOCATE_LOCAL(ppMultibuffers); - DEALLOCATE_LOCAL(pMultibuffer); + xfree(ppMultibuffers); + xfree(pMultibuffer); client->errorValue = ids[i]; return MultibufferErrorBase + MultibufferBadBuffer; } @@ -584,8 +584,8 @@ MultibufferResType); { if (ppMultibuffers[i] == ppMultibuffers[j]) { - DEALLOCATE_LOCAL(ppMultibuffers); - DEALLOCATE_LOCAL(pMultibuffer); + xfree(ppMultibuffers); + xfree(pMultibuffer); client->errorValue = ids[i]; return BadMatch; } @@ -604,8 +604,8 @@ MultibufferResType); else PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf); - DEALLOCATE_LOCAL(ppMultibuffers); - DEALLOCATE_LOCAL(pMultibuffer); + xfree(ppMultibuffers); + xfree(pMultibuffer); return Success; } @@ -698,7 +698,7 @@ ProcGetMBufferAttributes (client) pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); if (!pMultibuffers) return BadAccess; - ids = (XID *) ALLOCATE_LOCAL (pMultibuffers->numMultibuffer * sizeof (XID)); + ids = (XID *) xalloc (pMultibuffers->numMultibuffer * sizeof (XID)); if (!ids) return BadAlloc; for (i = 0; i < pMultibuffers->numMultibuffer; i++) @@ -721,7 +721,7 @@ ProcGetMBufferAttributes (client) (char *)&rep); WriteToClient (client, (int)(pMultibuffers->numMultibuffer * sizeof (XID)), (char *)ids); - DEALLOCATE_LOCAL((pointer) ids); + xfree((pointer) ids); return client->noClientException; } @@ -836,7 +836,7 @@ ProcGetBufferInfo (client) nInfo += pDepth->numVids; } pInfo = (xMbufBufferInfo *) - ALLOCATE_LOCAL (nInfo * sizeof (xMbufBufferInfo)); + xalloc (nInfo * sizeof (xMbufBufferInfo)); if (!pInfo) return BadAlloc; @@ -872,7 +872,7 @@ ProcGetBufferInfo (client) } WriteToClient (client, sizeof (xMbufGetBufferInfoReply), (pointer) &rep); WriteToClient (client, (int) nInfo * sizeof (xMbufBufferInfo), (pointer) pInfo); - DEALLOCATE_LOCAL ((pointer) pInfo); + xfree ((pointer) pInfo); return client->noClientException; } @@ -1289,7 +1289,7 @@ DisplayImageBuffers (ids, nbuf) MultibuffersPtr *pMultibuffers; int i, j; - pMultibuffer = (MultibufferPtr *) ALLOCATE_LOCAL (nbuf * sizeof *pMultibuffer + + pMultibuffer = (MultibufferPtr *) xalloc (nbuf * sizeof *pMultibuffer + nbuf * sizeof *pMultibuffers); if (!pMultibuffer) return BadAlloc; @@ -1299,19 +1299,19 @@ DisplayImageBuffers (ids, nbuf) pMultibuffer[i] = (MultibufferPtr) LookupIDByType (ids[i], MultibufferResType); if (!pMultibuffer[i]) { - DEALLOCATE_LOCAL (pMultibuffer); + xfree (pMultibuffer); return MultibufferErrorBase + MultibufferBadBuffer; } pMultibuffers[i] = pMultibuffer[i]->pMultibuffers; for (j = 0; j < i; j++) if (pMultibuffers[i] == pMultibuffers[j]) { - DEALLOCATE_LOCAL (pMultibuffer); + xfree (pMultibuffer); return BadMatch; } } PerformDisplayRequest (pMultibuffers, pMultibuffer, nbuf); - DEALLOCATE_LOCAL (pMultibuffer); + xfree (pMultibuffer); return Success; } @@ -1415,7 +1415,7 @@ MultibufferExpose (pMultibuffer, pRegion) numRects = REGION_NUM_RECTS(pRegion); pBox = REGION_RECTS(pRegion); - pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent)); + pEvent = (xEvent *) xalloc(numRects * sizeof(xEvent)); if (pEvent) { pe = pEvent; @@ -1431,7 +1431,7 @@ MultibufferExpose (pMultibuffer, pRegion) } (void) DeliverEventsToMultibuffer (pMultibuffer, pEvent, numRects, ExposureMask); - DEALLOCATE_LOCAL(pEvent); + xfree(pEvent); } } } @@ -1609,7 +1609,8 @@ MultibufferPositionWindow (pWin, x, y) { pMultibuffer = &pMultibuffers->buffers[i]; pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, - pWin->drawable.depth); + pWin->drawable.depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) { DestroyImageBuffers (pWin); diff --git a/Xext/mbufbf.c b/Xext/mbufbf.c index b879abcb0..a3b3de79d 100644 --- a/Xext/mbufbf.c +++ b/Xext/mbufbf.c @@ -614,7 +614,7 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum) if (!pGC) return; - prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(prgn) * + prect = (xRectangle *)xalloc(REGION_NUM_RECTS(prgn) * sizeof(xRectangle)); if (!prect) { @@ -638,7 +638,7 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum) prect -= numRects; (* pGC->ops->PolyFillRect)(pDrawable, pGC, numRects, prect); - DEALLOCATE_LOCAL(prect); + xfree(prect); FreeScratchGC (pGC); } diff --git a/Xext/mbufpx.c b/Xext/mbufpx.c index 16717d330..21d525906 100644 --- a/Xext/mbufpx.c +++ b/Xext/mbufpx.c @@ -155,7 +155,7 @@ pixCreateImageBuffers (pWin, nbuf, ids, action, hint) { pMBBuffer = &pMBWindow->buffers[i]; pMBBuffer->pDrawable = (DrawablePtr) - (*pScreen->CreatePixmap) (pScreen, width, height, depth); + (*pScreen->CreatePixmap) (pScreen, width, height, depth, 0); if (!pMBBuffer->pDrawable) break; @@ -263,7 +263,7 @@ MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion) int nrects = REGION_NUM_RECTS(pRegion); BoxPtr pbox = REGION_RECTS(pRegion); - pRects = (xRectangle *)ALLOCATE_LOCAL(nrects * sizeof(xRectangle)); + pRects = (xRectangle *)xalloc(nrects * sizeof(xRectangle)); if (pRects) { int i; @@ -275,7 +275,7 @@ MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion) pRects[i].height = pbox->y2 - pbox->y1; } MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects); - DEALLOCATE_LOCAL(pRects); + xfree(pRects); } } @@ -542,7 +542,8 @@ pixPositionWindow (pWin, x, y) for (i = 0; i < pMBWindow->numMultibuffer; i++) { pMBBuffer = &pMBWindow->buffers[i]; - pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pWin->drawable.depth); + pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pWin->drawable.depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) { (* MB_SCREEN_PRIV(pScreen)->DestroyImageBuffers)(pWin); diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 5933c02bc..402662f9e 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -1272,7 +1272,7 @@ int PanoramiXPolyPoint(ClientPtr client) isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; npoint = ((client->req_len << 2) - sizeof(xPolyPointReq)) >> 2; if (npoint > 0) { - origPts = (xPoint *) ALLOCATE_LOCAL(npoint * sizeof(xPoint)); + origPts = (xPoint *) xalloc(npoint * sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); FOR_NSCREENS_FORWARD(j){ @@ -1299,7 +1299,7 @@ int PanoramiXPolyPoint(ClientPtr client) result = (* SavedProcVector[X_PolyPoint])(client); if(result != Success) break; } - DEALLOCATE_LOCAL(origPts); + xfree(origPts); return (result); } else return (client->noClientException); @@ -1330,7 +1330,7 @@ int PanoramiXPolyLine(ClientPtr client) isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; npoint = ((client->req_len << 2) - sizeof(xPolyLineReq)) >> 2; if (npoint > 0){ - origPts = (xPoint *) ALLOCATE_LOCAL(npoint * sizeof(xPoint)); + origPts = (xPoint *) xalloc(npoint * sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); FOR_NSCREENS_FORWARD(j){ @@ -1357,7 +1357,7 @@ int PanoramiXPolyLine(ClientPtr client) result = (* SavedProcVector[X_PolyLine])(client); if(result != Success) break; } - DEALLOCATE_LOCAL(origPts); + xfree(origPts); return (result); } else return (client->noClientException); @@ -1391,7 +1391,7 @@ int PanoramiXPolySegment(ClientPtr client) if(nsegs & 4) return BadLength; nsegs >>= 3; if (nsegs > 0) { - origSegs = (xSegment *) ALLOCATE_LOCAL(nsegs * sizeof(xSegment)); + origSegs = (xSegment *) xalloc(nsegs * sizeof(xSegment)); memcpy((char *) origSegs, (char *) &stuff[1], nsegs * sizeof(xSegment)); FOR_NSCREENS_FORWARD(j){ @@ -1418,7 +1418,7 @@ int PanoramiXPolySegment(ClientPtr client) result = (* SavedProcVector[X_PolySegment])(client); if(result != Success) break; } - DEALLOCATE_LOCAL(origSegs); + xfree(origSegs); return (result); } else return (client->noClientException); @@ -1453,7 +1453,7 @@ int PanoramiXPolyRectangle(ClientPtr client) if(nrects & 4) return BadLength; nrects >>= 3; if (nrects > 0){ - origRecs = (xRectangle *) ALLOCATE_LOCAL(nrects * sizeof(xRectangle)); + origRecs = (xRectangle *) xalloc(nrects * sizeof(xRectangle)); memcpy((char *)origRecs,(char *)&stuff[1],nrects * sizeof(xRectangle)); FOR_NSCREENS_FORWARD(j){ @@ -1479,7 +1479,7 @@ int PanoramiXPolyRectangle(ClientPtr client) result = (* SavedProcVector[X_PolyRectangle])(client); if(result != Success) break; } - DEALLOCATE_LOCAL(origRecs); + xfree(origRecs); return (result); } else return (client->noClientException); @@ -1513,7 +1513,7 @@ int PanoramiXPolyArc(ClientPtr client) if(narcs % sizeof(xArc)) return BadLength; narcs /= sizeof(xArc); if (narcs > 0){ - origArcs = (xArc *) ALLOCATE_LOCAL(narcs * sizeof(xArc)); + origArcs = (xArc *) xalloc(narcs * sizeof(xArc)); memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc)); FOR_NSCREENS_FORWARD(j){ @@ -1537,7 +1537,7 @@ int PanoramiXPolyArc(ClientPtr client) result = (* SavedProcVector[X_PolyArc])(client); if(result != Success) break; } - DEALLOCATE_LOCAL(origArcs); + xfree(origArcs); return (result); } else return (client->noClientException); @@ -1569,7 +1569,7 @@ int PanoramiXFillPoly(ClientPtr client) count = ((client->req_len << 2) - sizeof(xFillPolyReq)) >> 2; if (count > 0){ - locPts = (DDXPointPtr) ALLOCATE_LOCAL(count * sizeof(DDXPointRec)); + locPts = (DDXPointPtr) xalloc(count * sizeof(DDXPointRec)); memcpy((char *)locPts, (char *)&stuff[1], count * sizeof(DDXPointRec)); FOR_NSCREENS_FORWARD(j){ @@ -1596,7 +1596,7 @@ int PanoramiXFillPoly(ClientPtr client) result = (* SavedProcVector[X_FillPoly])(client); if(result != Success) break; } - DEALLOCATE_LOCAL(locPts); + xfree(locPts); return (result); } else return (client->noClientException); @@ -1630,7 +1630,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client) if(things & 4) return BadLength; things >>= 3; if (things > 0){ - origRects = (xRectangle *) ALLOCATE_LOCAL(things * sizeof(xRectangle)); + origRects = (xRectangle *) xalloc(things * sizeof(xRectangle)); memcpy((char*)origRects,(char*)&stuff[1], things * sizeof(xRectangle)); FOR_NSCREENS_FORWARD(j){ @@ -1655,7 +1655,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client) result = (* SavedProcVector[X_PolyFillRectangle])(client); if(result != Success) break; } - DEALLOCATE_LOCAL(origRects); + xfree(origRects); return (result); } else return (client->noClientException); @@ -1689,7 +1689,7 @@ int PanoramiXPolyFillArc(ClientPtr client) IF_RETURN((narcs % sizeof(xArc)), BadLength); narcs /= sizeof(xArc); if (narcs > 0) { - origArcs = (xArc *) ALLOCATE_LOCAL(narcs * sizeof(xArc)); + origArcs = (xArc *) xalloc(narcs * sizeof(xArc)); memcpy((char *) origArcs, (char *)&stuff[1], narcs * sizeof(xArc)); FOR_NSCREENS_FORWARD(j){ @@ -1714,7 +1714,7 @@ int PanoramiXPolyFillArc(ClientPtr client) result = (* SavedProcVector[X_PolyFillArc])(client); if(result != Success) break; } - DEALLOCATE_LOCAL(origArcs); + xfree(origArcs); return (result); } else return (client->noClientException); diff --git a/Xext/saver.c b/Xext/saver.c index eff932573..6905fc678 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -687,7 +687,7 @@ CreateSaverWindow (pScreen) wantMap = wColormap (pWin); if (wantMap == None) return TRUE; - installedMaps = (Colormap *) ALLOCATE_LOCAL (pScreen->maxInstalledCmaps * + installedMaps = (Colormap *) xalloc (pScreen->maxInstalledCmaps * sizeof (Colormap)); numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps) (pScreen, installedMaps); @@ -695,7 +695,7 @@ CreateSaverWindow (pScreen) if (installedMaps[i] == wantMap) break; - DEALLOCATE_LOCAL ((char *) installedMaps); + xfree ((char *) installedMaps); if (i < numInstalled) return TRUE; diff --git a/Xext/shape.c b/Xext/shape.c index 12ab53a05..567737c13 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -1078,7 +1078,7 @@ ProcShapeGetRectangles (client) } if (!region) { nrects = 1; - rects = (xRectangle *) ALLOCATE_LOCAL (sizeof (xRectangle)); + rects = (xRectangle *) xalloc (sizeof (xRectangle)); if (!rects) return BadAlloc; switch (stuff->kind) { @@ -1105,7 +1105,7 @@ ProcShapeGetRectangles (client) BoxPtr box; nrects = REGION_NUM_RECTS(region); box = REGION_RECTS(region); - rects = (xRectangle *) ALLOCATE_LOCAL (nrects * sizeof (xRectangle)); + rects = (xRectangle *) xalloc (nrects * sizeof (xRectangle)); if (!rects && nrects) return BadAlloc; for (i = 0; i < nrects; i++, box++) { @@ -1128,7 +1128,7 @@ ProcShapeGetRectangles (client) } WriteToClient (client, sizeof (rep), (char *) &rep); WriteToClient (client, nrects * sizeof (xRectangle), (char *) rects); - DEALLOCATE_LOCAL (rects); + xfree (rects); return client->noClientException; } diff --git a/Xext/shm.c b/Xext/shm.c index db3c2ec90..dfe759fbe 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -557,7 +557,8 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) putGC = GetScratchGC(depth, dst->pScreen); if (!putGC) return; - pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth); + pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pmap) { FreeScratchGC(putGC); @@ -1084,7 +1085,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr) { register PixmapPtr pPixmap; - pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth); + pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0); if (!pPixmap) return NullPixmap; diff --git a/Xext/sync.c b/Xext/sync.c index 750e0db94..729014721 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -602,7 +602,7 @@ SyncSendCounterNotifyEvents(client, ppAwait, num_events) if (client->clientGone) return; pev = pEvents = (xSyncCounterNotifyEvent *) - ALLOCATE_LOCAL(num_events * sizeof(xSyncCounterNotifyEvent)); + xalloc(num_events * sizeof(xSyncCounterNotifyEvent)); if (!pEvents) return; UpdateCurrentTime(); @@ -623,7 +623,7 @@ SyncSendCounterNotifyEvents(client, ppAwait, num_events) } /* swapping will be taken care of by this */ WriteEventsToClient(client, num_events, (xEvent *)pEvents); - DEALLOCATE_LOCAL(pEvents); + xfree(pEvents); } @@ -733,7 +733,7 @@ SyncAwaitTriggerFired(pTrigger) pAwaitUnion = (SyncAwaitUnion *)pAwait->pHeader; numwaits = pAwaitUnion->header.num_waitconditions; - ppAwait = (SyncAwait **)ALLOCATE_LOCAL(numwaits * sizeof(SyncAwait *)); + ppAwait = (SyncAwait **)xalloc(numwaits * sizeof(SyncAwait *)); if (!ppAwait) goto bail; @@ -802,7 +802,7 @@ SyncAwaitTriggerFired(pTrigger) if (num_events) SyncSendCounterNotifyEvents(pAwaitUnion->header.client, ppAwait, num_events); - DEALLOCATE_LOCAL(ppAwait); + xfree(ppAwait); bail: /* unblock the client */ @@ -1397,7 +1397,7 @@ ProcSyncListSystemCounters(client) if (len) { - walklist = list = (xSyncSystemCounter *) ALLOCATE_LOCAL(len); + walklist = list = (xSyncSystemCounter *) xalloc(len); if (!list) return BadAlloc; } @@ -1443,7 +1443,7 @@ ProcSyncListSystemCounters(client) if (len) { WriteToClient(client, len, (char *) list); - DEALLOCATE_LOCAL(list); + xfree(list); } return (client->noClientException); diff --git a/Xext/xace.c b/Xext/xace.c index 7b27ecd6a..11145d117 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -461,7 +461,7 @@ XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h, /* convert region to list-of-rectangles for PolyFillRect */ - pRects = (xRectangle *)ALLOCATE_LOCAL(nRects * sizeof(xRectangle *)); + pRects = (xRectangle *)xalloc(nRects * sizeof(xRectangle *)); if (!pRects) { failed = TRUE; @@ -513,7 +513,7 @@ XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h, */ bzero(pBuf, (int)(widthBytesLine * h)); } - if (pRects) DEALLOCATE_LOCAL(pRects); + if (pRects) xfree(pRects); if (pScratchGC) FreeScratchGC(pScratchGC); if (pPix) FreeScratchPixmapHeader(pPix); } diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index a8af43d09..e2f589040 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -483,7 +483,7 @@ ProcXF86BigfontQueryFont( } else { #endif pCI = (xCharInfo *) - ALLOCATE_LOCAL(nCharInfos * sizeof(xCharInfo)); + xalloc(nCharInfos * sizeof(xCharInfo)); if (!pCI) return BadAlloc; #ifdef HAS_SHM @@ -546,9 +546,9 @@ ProcXF86BigfontQueryFont( hashModulus = nCharInfos+1; tmp = (CARD16*) - ALLOCATE_LOCAL((4*nCharInfos+1) * sizeof(CARD16)); + xalloc((4*nCharInfos+1) * sizeof(CARD16)); if (!tmp) { - if (!pDesc) DEALLOCATE_LOCAL(pCI); + if (!pDesc) xfree(pCI); return BadAlloc; } pIndex2UniqIndex = tmp; @@ -631,12 +631,12 @@ ProcXF86BigfontQueryFont( + (nCharInfos+1)/2 * 2 * sizeof(CARD16) : 0); xXF86BigfontQueryFontReply* reply = - (xXF86BigfontQueryFontReply *) ALLOCATE_LOCAL(rlength); + (xXF86BigfontQueryFontReply *) xalloc(rlength); char* p; if (!reply) { if (nCharInfos > 0) { - if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex); - if (!pDesc) DEALLOCATE_LOCAL(pCI); + if (shmid == -1) xfree(pIndex2UniqIndex); + if (!pDesc) xfree(pCI); } return BadAlloc; } @@ -714,10 +714,10 @@ ProcXF86BigfontQueryFont( } } WriteToClient(client, rlength, (char *)reply); - DEALLOCATE_LOCAL(reply); + xfree(reply); if (nCharInfos > 0) { - if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex); - if (!pDesc) DEALLOCATE_LOCAL(pCI); + if (shmid == -1) xfree(pIndex2UniqIndex); + if (!pDesc) xfree(pCI); } return (client->noClientException); } diff --git a/Xext/xres.c b/Xext/xres.c index e78176e41..281ba20cd 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -65,7 +65,7 @@ ProcXResQueryClients (ClientPtr client) REQUEST_SIZE_MATCH(xXResQueryClientsReq); - current_clients = ALLOCATE_LOCAL((currentMaxClients - 1) * sizeof(int)); + current_clients = xalloc((currentMaxClients - 1) * sizeof(int)); num_clients = 0; for(i = 1; i < currentMaxClients; i++) { @@ -103,7 +103,7 @@ ProcXResQueryClients (ClientPtr client) } } - DEALLOCATE_LOCAL(current_clients); + xfree(current_clients); return (client->noClientException); } @@ -136,7 +136,7 @@ ProcXResQueryClientResources (ClientPtr client) return BadValue; } - counts = ALLOCATE_LOCAL((lastResourceType + 1) * sizeof(int)); + counts = xalloc((lastResourceType + 1) * sizeof(int)); memset(counts, 0, (lastResourceType + 1) * sizeof(int)); @@ -188,7 +188,7 @@ ProcXResQueryClientResources (ClientPtr client) } } - DEALLOCATE_LOCAL(counts); + xfree(counts); return (client->noClientException); } |