DIX: Remove usage of alloca
Replace with heap allocations.
This commit is contained in:
parent
3b77689266
commit
914922fd61
|
@ -751,7 +751,7 @@ UpdateColors (ColormapPtr pmap)
|
||||||
|
|
||||||
pVisual = pmap->pVisual;
|
pVisual = pmap->pVisual;
|
||||||
size = pVisual->ColormapEntries;
|
size = pVisual->ColormapEntries;
|
||||||
defs = (xColorItem *)ALLOCATE_LOCAL(size * sizeof(xColorItem));
|
defs = (xColorItem *)xalloc(size * sizeof(xColorItem));
|
||||||
if (!defs)
|
if (!defs)
|
||||||
return;
|
return;
|
||||||
n = 0;
|
n = 0;
|
||||||
|
@ -801,7 +801,7 @@ UpdateColors (ColormapPtr pmap)
|
||||||
}
|
}
|
||||||
if (n)
|
if (n)
|
||||||
(*pmap->pScreen->StoreColors)(pmap, n, defs);
|
(*pmap->pScreen->StoreColors)(pmap, n, defs);
|
||||||
DEALLOCATE_LOCAL(defs);
|
xfree(defs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get a read-only color from a ColorMap (probably slow for large maps)
|
/* Get a read-only color from a ColorMap (probably slow for large maps)
|
||||||
|
@ -1752,14 +1752,14 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
|
||||||
for(p = pixels; p < pixels + c; p++)
|
for(p = pixels; p < pixels + c; p++)
|
||||||
*p = 0;
|
*p = 0;
|
||||||
|
|
||||||
ppixRed = (Pixel *)ALLOCATE_LOCAL(npixR * sizeof(Pixel));
|
ppixRed = (Pixel *)xalloc(npixR * sizeof(Pixel));
|
||||||
ppixGreen = (Pixel *)ALLOCATE_LOCAL(npixG * sizeof(Pixel));
|
ppixGreen = (Pixel *)xalloc(npixG * sizeof(Pixel));
|
||||||
ppixBlue = (Pixel *)ALLOCATE_LOCAL(npixB * sizeof(Pixel));
|
ppixBlue = (Pixel *)xalloc(npixB * sizeof(Pixel));
|
||||||
if (!ppixRed || !ppixGreen || !ppixBlue)
|
if (!ppixRed || !ppixGreen || !ppixBlue)
|
||||||
{
|
{
|
||||||
if (ppixBlue) DEALLOCATE_LOCAL(ppixBlue);
|
if (ppixBlue) xfree(ppixBlue);
|
||||||
if (ppixGreen) DEALLOCATE_LOCAL(ppixGreen);
|
if (ppixGreen) xfree(ppixGreen);
|
||||||
if (ppixRed) DEALLOCATE_LOCAL(ppixRed);
|
if (ppixRed) xfree(ppixRed);
|
||||||
return(BadAlloc);
|
return(BadAlloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1797,9 +1797,9 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
|
||||||
if (okB)
|
if (okB)
|
||||||
for(ppix = ppixBlue, npix = npixB; --npix >= 0; ppix++)
|
for(ppix = ppixBlue, npix = npixB; --npix >= 0; ppix++)
|
||||||
pmap->blue[*ppix].refcnt = 0;
|
pmap->blue[*ppix].refcnt = 0;
|
||||||
DEALLOCATE_LOCAL(ppixBlue);
|
xfree(ppixBlue);
|
||||||
DEALLOCATE_LOCAL(ppixGreen);
|
xfree(ppixGreen);
|
||||||
DEALLOCATE_LOCAL(ppixRed);
|
xfree(ppixRed);
|
||||||
return(BadAlloc);
|
return(BadAlloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1841,9 +1841,9 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont
|
||||||
for (pDst = pixels; pDst < pixels + c; pDst++)
|
for (pDst = pixels; pDst < pixels + c; pDst++)
|
||||||
*pDst |= ALPHAMASK(pmap->pVisual);
|
*pDst |= ALPHAMASK(pmap->pVisual);
|
||||||
|
|
||||||
DEALLOCATE_LOCAL(ppixBlue);
|
xfree(ppixBlue);
|
||||||
DEALLOCATE_LOCAL(ppixGreen);
|
xfree(ppixGreen);
|
||||||
DEALLOCATE_LOCAL(ppixRed);
|
xfree(ppixRed);
|
||||||
|
|
||||||
return (Success);
|
return (Success);
|
||||||
}
|
}
|
||||||
|
@ -1859,7 +1859,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
|
||||||
npix = c << r;
|
npix = c << r;
|
||||||
if ((r >= 32) || (npix > pmap->freeRed) || (npix < c))
|
if ((r >= 32) || (npix > pmap->freeRed) || (npix < c))
|
||||||
return(BadAlloc);
|
return(BadAlloc);
|
||||||
if(!(ppixTemp = (Pixel *)ALLOCATE_LOCAL(npix * sizeof(Pixel))))
|
if(!(ppixTemp = (Pixel *)xalloc(npix * sizeof(Pixel))))
|
||||||
return(BadAlloc);
|
return(BadAlloc);
|
||||||
ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask);
|
ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask);
|
||||||
|
|
||||||
|
@ -1889,7 +1889,7 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig,
|
||||||
pmap->numPixelsRed[client] += npix;
|
pmap->numPixelsRed[client] += npix;
|
||||||
pmap->freeRed -= npix;
|
pmap->freeRed -= npix;
|
||||||
}
|
}
|
||||||
DEALLOCATE_LOCAL(ppixTemp);
|
xfree(ppixTemp);
|
||||||
return (ok ? Success : BadAlloc);
|
return (ok ? Success : BadAlloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2089,7 +2089,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b,
|
||||||
|
|
||||||
npixClientNew = c << (r + g + b);
|
npixClientNew = c << (r + g + b);
|
||||||
npixShared = (c << r) + (c << g) + (c << b);
|
npixShared = (c << r) + (c << g) + (c << b);
|
||||||
psharedList = (SHAREDCOLOR **)ALLOCATE_LOCAL(npixShared *
|
psharedList = (SHAREDCOLOR **)xalloc(npixShared *
|
||||||
sizeof(SHAREDCOLOR *));
|
sizeof(SHAREDCOLOR *));
|
||||||
if (!psharedList)
|
if (!psharedList)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2204,7 +2204,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEALLOCATE_LOCAL(psharedList);
|
xfree(psharedList);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2679,7 +2679,7 @@ IsMapInstalled(Colormap map, WindowPtr pWin)
|
||||||
Colormap *pmaps;
|
Colormap *pmaps;
|
||||||
int imap, nummaps, found;
|
int imap, nummaps, found;
|
||||||
|
|
||||||
pmaps = (Colormap *) ALLOCATE_LOCAL(
|
pmaps = (Colormap *) xalloc(
|
||||||
pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap));
|
pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap));
|
||||||
if(!pmaps)
|
if(!pmaps)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
@ -2694,6 +2694,6 @@ IsMapInstalled(Colormap map, WindowPtr pWin)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEALLOCATE_LOCAL(pmaps);
|
xfree(pmaps);
|
||||||
return (found);
|
return (found);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1997,7 +1997,7 @@ ProcGetMotionEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
if (CompareTimeStamps(stop, currentTime) == LATER)
|
if (CompareTimeStamps(stop, currentTime) == LATER)
|
||||||
stop = currentTime;
|
stop = currentTime;
|
||||||
coords = (xTimecoord *)ALLOCATE_LOCAL(mouse->valuator->numMotionEvents
|
coords = (xTimecoord *)xalloc(mouse->valuator->numMotionEvents
|
||||||
* sizeof(xTimecoord));
|
* sizeof(xTimecoord));
|
||||||
if (!coords)
|
if (!coords)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
@ -2031,7 +2031,7 @@ ProcGetMotionEvents(ClientPtr client)
|
||||||
(char *)coords);
|
(char *)coords);
|
||||||
}
|
}
|
||||||
if (coords)
|
if (coords)
|
||||||
DEALLOCATE_LOCAL(coords);
|
xfree(coords);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -777,7 +777,7 @@ finish:
|
||||||
reply.nFonts = nnames;
|
reply.nFonts = nnames;
|
||||||
reply.sequenceNumber = client->sequence;
|
reply.sequenceNumber = client->sequence;
|
||||||
|
|
||||||
bufptr = bufferStart = (char *) ALLOCATE_LOCAL(reply.length << 2);
|
bufptr = bufferStart = (char *) xalloc(reply.length << 2);
|
||||||
|
|
||||||
if (!bufptr && reply.length) {
|
if (!bufptr && reply.length) {
|
||||||
SendErrorToClient(client, X_ListFonts, 0, 0, BadAlloc);
|
SendErrorToClient(client, X_ListFonts, 0, 0, BadAlloc);
|
||||||
|
@ -802,7 +802,7 @@ finish:
|
||||||
client->pSwapReplyFunc = ReplySwapVector[X_ListFonts];
|
client->pSwapReplyFunc = ReplySwapVector[X_ListFonts];
|
||||||
WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply);
|
WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply);
|
||||||
(void) WriteToClient(client, stringLens + nnames, bufferStart);
|
(void) WriteToClient(client, stringLens + nnames, bufferStart);
|
||||||
DEALLOCATE_LOCAL(bufferStart);
|
xfree(bufferStart);
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
if (c->slept)
|
if (c->slept)
|
||||||
|
@ -1797,7 +1797,7 @@ SetDefaultFontPath(char *path)
|
||||||
|
|
||||||
/* get enough for string, plus values -- use up commas */
|
/* get enough for string, plus values -- use up commas */
|
||||||
len = strlen(path) + 1;
|
len = strlen(path) + 1;
|
||||||
nump = cp = newpath = (unsigned char *) ALLOCATE_LOCAL(len);
|
nump = cp = newpath = (unsigned char *) xalloc(len);
|
||||||
if (!newpath)
|
if (!newpath)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
pp = (unsigned char *) path;
|
pp = (unsigned char *) path;
|
||||||
|
@ -1818,7 +1818,7 @@ SetDefaultFontPath(char *path)
|
||||||
|
|
||||||
err = SetFontPathElements(num, newpath, &bad, TRUE);
|
err = SetFontPathElements(num, newpath, &bad, TRUE);
|
||||||
|
|
||||||
DEALLOCATE_LOCAL(newpath);
|
xfree(newpath);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,7 +364,7 @@ ProcListExtensions(ClientPtr client)
|
||||||
total_length += strlen(extensions[i]->aliases[j]) + 1;
|
total_length += strlen(extensions[i]->aliases[j]) + 1;
|
||||||
}
|
}
|
||||||
reply.length = (total_length + 3) >> 2;
|
reply.length = (total_length + 3) >> 2;
|
||||||
buffer = bufptr = (char *)ALLOCATE_LOCAL(total_length);
|
buffer = bufptr = (char *)xalloc(total_length);
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
return(BadAlloc);
|
return(BadAlloc);
|
||||||
for (i=0; i<NumExtensions; i++)
|
for (i=0; i<NumExtensions; i++)
|
||||||
|
@ -388,7 +388,7 @@ ProcListExtensions(ClientPtr client)
|
||||||
if (reply.length)
|
if (reply.length)
|
||||||
{
|
{
|
||||||
WriteToClient(client, total_length, buffer);
|
WriteToClient(client, total_length, buffer);
|
||||||
DEALLOCATE_LOCAL(buffer);
|
xfree(buffer);
|
||||||
}
|
}
|
||||||
return(client->noClientException);
|
return(client->noClientException);
|
||||||
}
|
}
|
||||||
|
|
24
dix/grabs.c
24
dix/grabs.c
|
@ -369,16 +369,16 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
|
||||||
i++;
|
i++;
|
||||||
if (!i)
|
if (!i)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
deletes = (GrabPtr *)ALLOCATE_LOCAL(i * sizeof(GrabPtr));
|
deletes = (GrabPtr *)xalloc(i * sizeof(GrabPtr));
|
||||||
adds = (GrabPtr *)ALLOCATE_LOCAL(i * sizeof(GrabPtr));
|
adds = (GrabPtr *)xalloc(i * sizeof(GrabPtr));
|
||||||
updates = (Mask ***)ALLOCATE_LOCAL(i * sizeof(Mask **));
|
updates = (Mask ***)xalloc(i * sizeof(Mask **));
|
||||||
details = (Mask **)ALLOCATE_LOCAL(i * sizeof(Mask *));
|
details = (Mask **)xalloc(i * sizeof(Mask *));
|
||||||
if (!deletes || !adds || !updates || !details)
|
if (!deletes || !adds || !updates || !details)
|
||||||
{
|
{
|
||||||
if (details) DEALLOCATE_LOCAL(details);
|
if (details) xfree(details);
|
||||||
if (updates) DEALLOCATE_LOCAL(updates);
|
if (updates) xfree(updates);
|
||||||
if (adds) DEALLOCATE_LOCAL(adds);
|
if (adds) xfree(adds);
|
||||||
if (deletes) DEALLOCATE_LOCAL(deletes);
|
if (deletes) xfree(deletes);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
ndels = nadds = nups = 0;
|
ndels = nadds = nups = 0;
|
||||||
|
@ -473,10 +473,10 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
|
||||||
*updates[i] = details[i];
|
*updates[i] = details[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEALLOCATE_LOCAL(details);
|
xfree(details);
|
||||||
DEALLOCATE_LOCAL(updates);
|
xfree(updates);
|
||||||
DEALLOCATE_LOCAL(adds);
|
xfree(adds);
|
||||||
DEALLOCATE_LOCAL(deletes);
|
xfree(deletes);
|
||||||
return ok;
|
return ok;
|
||||||
|
|
||||||
#undef UPDATE
|
#undef UPDATE
|
||||||
|
|
|
@ -122,7 +122,7 @@ ProcRotateProperties(ClientPtr client)
|
||||||
if (!stuff->nAtoms)
|
if (!stuff->nAtoms)
|
||||||
return(Success);
|
return(Success);
|
||||||
atoms = (Atom *) & stuff[1];
|
atoms = (Atom *) & stuff[1];
|
||||||
props = (PropertyPtr *)ALLOCATE_LOCAL(stuff->nAtoms * sizeof(PropertyPtr));
|
props = (PropertyPtr *)xalloc(stuff->nAtoms * sizeof(PropertyPtr));
|
||||||
if (!props)
|
if (!props)
|
||||||
return(BadAlloc);
|
return(BadAlloc);
|
||||||
for (i = 0; i < stuff->nAtoms; i++)
|
for (i = 0; i < stuff->nAtoms; i++)
|
||||||
|
@ -131,19 +131,19 @@ ProcRotateProperties(ClientPtr client)
|
||||||
DixReadAccess|DixWriteAccess);
|
DixReadAccess|DixWriteAccess);
|
||||||
|
|
||||||
if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) {
|
if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) {
|
||||||
DEALLOCATE_LOCAL(props);
|
xfree(props);
|
||||||
client->errorValue = atoms[i];
|
client->errorValue = atoms[i];
|
||||||
return BadAtom;
|
return BadAtom;
|
||||||
}
|
}
|
||||||
if (XaceIgnoreOperation == action) {
|
if (XaceIgnoreOperation == action) {
|
||||||
DEALLOCATE_LOCAL(props);
|
xfree(props);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j = i + 1; j < stuff->nAtoms; j++)
|
for (j = i + 1; j < stuff->nAtoms; j++)
|
||||||
if (atoms[j] == atoms[i])
|
if (atoms[j] == atoms[i])
|
||||||
{
|
{
|
||||||
DEALLOCATE_LOCAL(props);
|
xfree(props);
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
}
|
}
|
||||||
pProp = wUserProps (pWin);
|
pProp = wUserProps (pWin);
|
||||||
|
@ -153,7 +153,7 @@ ProcRotateProperties(ClientPtr client)
|
||||||
goto found;
|
goto found;
|
||||||
pProp = pProp->next;
|
pProp = pProp->next;
|
||||||
}
|
}
|
||||||
DEALLOCATE_LOCAL(props);
|
xfree(props);
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
found:
|
found:
|
||||||
props[i] = pProp;
|
props[i] = pProp;
|
||||||
|
@ -175,7 +175,7 @@ found:
|
||||||
props[i]->propertyName = atoms[(i + delta) % stuff->nAtoms];
|
props[i]->propertyName = atoms[(i + delta) % stuff->nAtoms];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEALLOCATE_LOCAL(props);
|
xfree(props);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -575,7 +575,7 @@ ProcListProperties(ClientPtr client)
|
||||||
numProps++;
|
numProps++;
|
||||||
}
|
}
|
||||||
if (numProps)
|
if (numProps)
|
||||||
if(!(pAtoms = (Atom *)ALLOCATE_LOCAL(numProps * sizeof(Atom))))
|
if(!(pAtoms = (Atom *)xalloc(numProps * sizeof(Atom))))
|
||||||
return(BadAlloc);
|
return(BadAlloc);
|
||||||
|
|
||||||
xlpr.type = X_Reply;
|
xlpr.type = X_Reply;
|
||||||
|
@ -594,7 +594,7 @@ ProcListProperties(ClientPtr client)
|
||||||
{
|
{
|
||||||
client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write;
|
client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write;
|
||||||
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
|
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
|
||||||
DEALLOCATE_LOCAL(pAtoms);
|
xfree(pAtoms);
|
||||||
}
|
}
|
||||||
return(client->noClientException);
|
return(client->noClientException);
|
||||||
}
|
}
|
||||||
|
|
|
@ -507,13 +507,13 @@ RebuildTable(int client)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
j = 2 * clientTable[client].buckets;
|
j = 2 * clientTable[client].buckets;
|
||||||
tails = (ResourcePtr **)ALLOCATE_LOCAL(j * sizeof(ResourcePtr *));
|
tails = (ResourcePtr **)xalloc(j * sizeof(ResourcePtr *));
|
||||||
if (!tails)
|
if (!tails)
|
||||||
return;
|
return;
|
||||||
resources = (ResourcePtr *)xalloc(j * sizeof(ResourcePtr));
|
resources = (ResourcePtr *)xalloc(j * sizeof(ResourcePtr));
|
||||||
if (!resources)
|
if (!resources)
|
||||||
{
|
{
|
||||||
DEALLOCATE_LOCAL(tails);
|
xfree(tails);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++)
|
for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++)
|
||||||
|
@ -536,7 +536,7 @@ RebuildTable(int client)
|
||||||
*tptr = &res->next;
|
*tptr = &res->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEALLOCATE_LOCAL(tails);
|
xfree(tails);
|
||||||
clientTable[client].buckets *= 2;
|
clientTable[client].buckets *= 2;
|
||||||
xfree(clientTable[client].resources);
|
xfree(clientTable[client].resources);
|
||||||
clientTable[client].resources = resources;
|
clientTable[client].resources = resources;
|
||||||
|
|
|
@ -101,7 +101,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
||||||
CARD32 tmpbuf[1];
|
CARD32 tmpbuf[1];
|
||||||
|
|
||||||
/* Allocate as big a buffer as we can... */
|
/* Allocate as big a buffer as we can... */
|
||||||
while (!(pbufT = (CARD32 *) ALLOCATE_LOCAL(bufsize)))
|
while (!(pbufT = (CARD32 *) xalloc(bufsize)))
|
||||||
{
|
{
|
||||||
bufsize >>= 1;
|
bufsize >>= 1;
|
||||||
if (bufsize == 4)
|
if (bufsize == 4)
|
||||||
|
@ -133,7 +133,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pbufT != tmpbuf)
|
if (pbufT != tmpbuf)
|
||||||
DEALLOCATE_LOCAL ((char *) pbufT);
|
xfree ((char *) pbufT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -149,7 +149,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
|
||||||
short tmpbuf[2];
|
short tmpbuf[2];
|
||||||
|
|
||||||
/* Allocate as big a buffer as we can... */
|
/* Allocate as big a buffer as we can... */
|
||||||
while (!(pbufT = (short *) ALLOCATE_LOCAL(bufsize)))
|
while (!(pbufT = (short *) xalloc(bufsize)))
|
||||||
{
|
{
|
||||||
bufsize >>= 1;
|
bufsize >>= 1;
|
||||||
if (bufsize == 4)
|
if (bufsize == 4)
|
||||||
|
@ -181,7 +181,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pbufT != tmpbuf)
|
if (pbufT != tmpbuf)
|
||||||
DEALLOCATE_LOCAL ((char *) pbufT);
|
xfree ((char *) pbufT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1267,7 +1267,7 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
|
||||||
{
|
{
|
||||||
char *pInfoTBase;
|
char *pInfoTBase;
|
||||||
|
|
||||||
pInfoTBase = (char *) ALLOCATE_LOCAL(size);
|
pInfoTBase = (char *) xalloc(size);
|
||||||
if (!pInfoTBase)
|
if (!pInfoTBase)
|
||||||
{
|
{
|
||||||
pClient->noClientException = -1;
|
pClient->noClientException = -1;
|
||||||
|
@ -1275,7 +1275,7 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
|
||||||
}
|
}
|
||||||
SwapConnSetupInfo(pInfo, pInfoTBase);
|
SwapConnSetupInfo(pInfo, pInfoTBase);
|
||||||
(void)WriteToClient(pClient, (int)size, (char *) pInfoTBase);
|
(void)WriteToClient(pClient, (int)size, (char *) pInfoTBase);
|
||||||
DEALLOCATE_LOCAL(pInfoTBase);
|
xfree(pInfoTBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
|
|
Loading…
Reference in New Issue