diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 14:11:38 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 14:11:38 +0200 |
commit | 1dbd3c888a3eee51db5303bd93e95b84999f5d31 (patch) | |
tree | 84db92271726b42b8c0864c8b7c77b2330566fc1 /nx-X11/programs/Xserver/render | |
parent | 279d37127db241a9ee685f6b671f51aa21a972ea (diff) | |
parent | e85808245810d0cc6918104deef25213d5f9e06c (diff) | |
download | nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.gz nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.bz2 nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.zip |
Merge branch 'sunweaver-pr/backport-Xorg-memory-handling' into 3.6.x
Attributes GH PR #159: https://github.com/ArcticaProject/nx-libs/pull/159
Reviewed by: Vadim Troshchinskiy <vadim@qindel.com> -- Fri, 01 Jul 2016 12:47:46 -0700
Diffstat (limited to 'nx-X11/programs/Xserver/render')
-rw-r--r-- | nx-X11/programs/Xserver/render/animcur.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/filter.c | 28 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/glyph.c | 26 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/miindex.c | 10 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/mipict.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/picture.c | 64 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/render.c | 62 |
7 files changed, 99 insertions, 99 deletions
diff --git a/nx-X11/programs/Xserver/render/animcur.c b/nx-X11/programs/Xserver/render/animcur.c index 27e5ab949..c5535050e 100644 --- a/nx-X11/programs/Xserver/render/animcur.c +++ b/nx-X11/programs/Xserver/render/animcur.c @@ -128,7 +128,7 @@ AnimCurCloseScreen (int index, ScreenPtr pScreen) Unwrap(as, pScreen, RecolorCursor); SetAnimCurScreen(pScreen,0); ret = (*pScreen->CloseScreen) (index, pScreen); - xfree (as); + free (as); if (index == 0) AnimCurScreenPrivateIndex = -1; return ret; @@ -334,7 +334,7 @@ AnimCurInit (ScreenPtr pScreen) animCurState.elt = 0; animCurState.time = 0; } - as = (AnimCurScreenPtr) xalloc (sizeof (AnimCurScreenRec)); + as = (AnimCurScreenPtr) malloc (sizeof (AnimCurScreenRec)); if (!as) return FALSE; Wrap(as, pScreen, CloseScreen, AnimCurCloseScreen); @@ -366,7 +366,7 @@ AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *pp if (IsAnimCur (cursors[i])) return BadMatch; - pCursor = (CursorPtr) xalloc (sizeof (CursorRec) + + pCursor = (CursorPtr) malloc (sizeof (CursorRec) + sizeof (AnimCurRec) + ncursor * sizeof (AnimCurElt)); if (!pCursor) diff --git a/nx-X11/programs/Xserver/render/filter.c b/nx-X11/programs/Xserver/render/filter.c index 57a21a8c0..10e732997 100644 --- a/nx-X11/programs/Xserver/render/filter.c +++ b/nx-X11/programs/Xserver/render/filter.c @@ -62,18 +62,18 @@ PictureGetFilterId (char *filter, int len, Bool makeit) return i; if (!makeit) return -1; - name = xalloc (len + 1); + name = malloc (len + 1); if (!name) return -1; memcpy (name, filter, len); name[len] = '\0'; if (filterNames) - names = xrealloc (filterNames, (nfilterNames + 1) * sizeof (char *)); + names = realloc (filterNames, (nfilterNames + 1) * sizeof (char *)); else - names = xalloc (sizeof (char *)); + names = malloc (sizeof (char *)); if (!names) { - xfree (name); + free (name); return -1; } filterNames = names; @@ -119,8 +119,8 @@ PictureFreeFilterIds (void) int i; for (i = 0; i < nfilterNames; i++) - xfree (filterNames[i]); - xfree (filterNames); + free (filterNames[i]); + free (filterNames); nfilterNames = 0; filterNames = 0; } @@ -144,9 +144,9 @@ PictureAddFilter (ScreenPtr pScreen, if (ps->filters[i].id == id) return -1; if (ps->filters) - filters = xrealloc (ps->filters, (ps->nfilters + 1) * sizeof (PictFilterRec)); + filters = realloc (ps->filters, (ps->nfilters + 1) * sizeof (PictFilterRec)); else - filters = xalloc (sizeof (PictFilterRec)); + filters = malloc (sizeof (PictFilterRec)); if (!filters) return -1; ps->filters = filters; @@ -175,11 +175,11 @@ PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias) PictFilterAliasPtr aliases; if (ps->filterAliases) - aliases = xrealloc (ps->filterAliases, + aliases = realloc (ps->filterAliases, (ps->nfilterAliases + 1) * sizeof (PictFilterAliasRec)); else - aliases = xalloc (sizeof (PictFilterAliasRec)); + aliases = malloc (sizeof (PictFilterAliasRec)); if (!aliases) return FALSE; ps->filterAliases = aliases; @@ -272,8 +272,8 @@ PictureResetFilters (ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreen(pScreen); - xfree (ps->filters); - xfree (ps->filterAliases); + free (ps->filters); + free (ps->filterAliases); PictureFreeFilterIds (); } @@ -336,11 +336,11 @@ SetPicturePictFilter (PicturePtr pPicture, PictFilterPtr pFilter, } if (nparams != pPicture->filter_nparams) { - xFixed *new_params = xalloc (nparams * sizeof (xFixed)); + xFixed *new_params = malloc (nparams * sizeof (xFixed)); if (!new_params && nparams) return BadAlloc; - xfree (pPicture->filter_params); + free (pPicture->filter_params); pPicture->filter_params = new_params; pPicture->filter_nparams = nparams; } diff --git a/nx-X11/programs/Xserver/render/glyph.c b/nx-X11/programs/Xserver/render/glyph.c index 854a9069d..2ef1087e7 100644 --- a/nx-X11/programs/Xserver/render/glyph.c +++ b/nx-X11/programs/Xserver/render/glyph.c @@ -117,12 +117,12 @@ _GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, void * ptr) if (n > glyphSet->maxPrivate) { if (glyphSet->devPrivates && glyphSet->devPrivates != (void *)(&glyphSet[1])) { - new = (void **) xrealloc (glyphSet->devPrivates, + new = (void **) realloc (glyphSet->devPrivates, (n + 1) * sizeof (void *)); if (!new) return FALSE; } else { - new = (void **) xalloc ((n + 1) * sizeof (void *)); + new = (void **) malloc ((n + 1) * sizeof (void *)); if (!new) return FALSE; if (glyphSet->devPrivates) @@ -264,7 +264,7 @@ FreeGlyph (GlyphPtr glyph, int format) gr->signature = 0; globalGlyphs[format].tableEntries--; } - xfree (glyph); + free (glyph); } } @@ -281,7 +281,7 @@ AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id) gr = FindGlyphRef (&globalGlyphs[glyphSet->fdepth], hash, TRUE, glyph); if (gr->glyph && gr->glyph != DeletedGlyph) { - xfree (glyph); + free (glyph); glyph = gr->glyph; } else @@ -346,7 +346,7 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth) if (gi->height && padded_width > (UINT32_MAX - sizeof(GlyphRec))/gi->height) return 0; size = gi->height * padded_width; - glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec)); + glyph = (GlyphPtr) malloc (size + sizeof (GlyphRec)); if (!glyph) return 0; glyph->refcnt = 0; @@ -358,7 +358,7 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth) Bool AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet) { - hash->table = (GlyphRefPtr) xalloc (hashSet->size * sizeof (GlyphRefRec)); + hash->table = (GlyphRefPtr) malloc (hashSet->size * sizeof (GlyphRefRec)); if (!hash->table) return FALSE; memset (hash->table, 0, hashSet->size * sizeof (GlyphRefRec)); @@ -404,7 +404,7 @@ ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global) ++newHash.tableEntries; } } - xfree (hash->table); + free (hash->table); } *hash = newHash; if (global) @@ -434,7 +434,7 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) size = (sizeof (GlyphSetRec) + (sizeof (void *) * _GlyphSetPrivateAllocateIndex)); - glyphSet = xalloc (size); + glyphSet = malloc (size); if (!glyphSet) return FALSE; bzero((char *)glyphSet, size); @@ -444,7 +444,7 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) if (!AllocateGlyphHash (&glyphSet->hash, &glyphHashSets[0])) { - xfree (glyphSet); + free (glyphSet); return FALSE; } glyphSet->refcnt = 1; @@ -473,19 +473,19 @@ FreeGlyphSet (void *value, } if (!globalGlyphs[glyphSet->fdepth].tableEntries) { - xfree (globalGlyphs[glyphSet->fdepth].table); + free (globalGlyphs[glyphSet->fdepth].table); globalGlyphs[glyphSet->fdepth].table = 0; globalGlyphs[glyphSet->fdepth].hashSet = 0; } else ResizeGlyphHash (&globalGlyphs[glyphSet->fdepth], 0, TRUE); - xfree (table); + free (table); if (glyphSet->devPrivates && glyphSet->devPrivates != (void *)(&glyphSet[1])) - xfree(glyphSet->devPrivates); + free(glyphSet->devPrivates); - xfree (glyphSet); + free (glyphSet); } return Success; } diff --git a/nx-X11/programs/Xserver/render/miindex.c b/nx-X11/programs/Xserver/render/miindex.c index 03e2857a2..ce31c00fb 100644 --- a/nx-X11/programs/Xserver/render/miindex.c +++ b/nx-X11/programs/Xserver/render/miindex.c @@ -259,15 +259,15 @@ miInitIndexed (ScreenPtr pScreen, pixels[p] = p; } - pIndexed = xalloc (sizeof (miIndexedRec)); + pIndexed = malloc (sizeof (miIndexedRec)); if (!pIndexed) return FALSE; pFormat->index.nvalues = num; - pFormat->index.pValues = xalloc (num * sizeof (xIndexValue)); + pFormat->index.pValues = malloc (num * sizeof (xIndexValue)); if (!pFormat->index.pValues) { - xfree (pIndexed); + free (pIndexed); return FALSE; } @@ -323,12 +323,12 @@ miCloseIndexed (ScreenPtr pScreen, { if (pFormat->index.devPrivate) { - xfree (pFormat->index.devPrivate); + free (pFormat->index.devPrivate); pFormat->index.devPrivate = 0; } if (pFormat->index.pValues) { - xfree (pFormat->index.pValues); + free (pFormat->index.pValues); pFormat->index.pValues = 0; } } diff --git a/nx-X11/programs/Xserver/render/mipict.c b/nx-X11/programs/Xserver/render/mipict.c index ae7cf5a6d..5bd449d44 100644 --- a/nx-X11/programs/Xserver/render/mipict.c +++ b/nx-X11/programs/Xserver/render/mipict.c @@ -107,7 +107,7 @@ miChangePictureClip (PicturePtr pPicture, if (!clientClip) return BadAlloc; clientClipType = CT_REGION; - xfree(value); + free(value); break; } (*ps->DestroyPictureClip) (pPicture); diff --git a/nx-X11/programs/Xserver/render/picture.c b/nx-X11/programs/Xserver/render/picture.c index a29a9568c..4a1cd98f5 100644 --- a/nx-X11/programs/Xserver/render/picture.c +++ b/nx-X11/programs/Xserver/render/picture.c @@ -82,7 +82,7 @@ AllocatePicturePrivate (ScreenPtr pScreen, int index2, unsigned int amount) { unsigned int *nsizes; - nsizes = (unsigned int *)xrealloc(ps->PicturePrivateSizes, + nsizes = (unsigned int *)realloc(ps->PicturePrivateSizes, (index2 + 1) * sizeof(unsigned int)); if (!nsizes) return FALSE; @@ -141,9 +141,9 @@ PictureCloseScreen (int index, ScreenPtr pScreen) (*ps->CloseIndexed) (pScreen, &ps->formats[n]); SetPictureScreen(pScreen, 0); if (ps->PicturePrivateSizes) - xfree (ps->PicturePrivateSizes); - xfree (ps->formats); - xfree (ps); + free (ps->PicturePrivateSizes); + free (ps->formats); + free (ps); return ret; } @@ -365,7 +365,7 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) } - pFormats = (PictFormatPtr) xalloc (nformats * sizeof (PictFormatRec)); + pFormats = (PictFormatPtr) malloc (nformats * sizeof (PictFormatRec)); if (!pFormats) return 0; memset (pFormats, '\0', nformats * sizeof (PictFormatRec)); @@ -660,7 +660,7 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { if (!AddResource (formats[n].id, PictFormatType, (void *) (formats+n))) { - xfree (formats); + free (formats); return FALSE; } if (formats[n].type == PictTypeIndexed) @@ -689,18 +689,18 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) } formats[n].format = PICT_FORMAT(0,type,a,r,g,b); } - ps = (PictureScreenPtr) xalloc (sizeof (PictureScreenRec)); + ps = (PictureScreenPtr) malloc (sizeof (PictureScreenRec)); if (!ps) { - xfree (formats); + free (formats); return FALSE; } SetPictureScreen(pScreen, ps); if (!GlyphInit (pScreen)) { SetPictureScreen(pScreen, 0); - xfree (formats); - xfree (ps); + free (formats); + free (ps); return FALSE; } @@ -730,8 +730,8 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { PictureResetFilters (pScreen); SetPictureScreen(pScreen, 0); - xfree (formats); - xfree (ps); + free (formats); + free (ps); return FALSE; } @@ -784,7 +784,7 @@ AllocatePicture (ScreenPtr pScreen) unsigned int size; int i; - pPicture = (PicturePtr) xalloc (ps->totalPictureSize); + pPicture = (PicturePtr) malloc (ps->totalPictureSize); if (!pPicture) return 0; ppriv = (DevUnion *)(pPicture + 1); @@ -961,7 +961,7 @@ static void initGradient(SourcePictPtr pGradient, int stopCount, dpos = stopPoints[i]; } - pGradient->linear.stops = xalloc(stopCount*sizeof(PictGradientStop)); + pGradient->linear.stops = malloc(stopCount*sizeof(PictGradientStop)); if (!pGradient->linear.stops) { *error = BadAlloc; return; @@ -980,7 +980,7 @@ static void initGradient(SourcePictPtr pGradient, int stopCount, static PicturePtr createSourcePicture(void) { PicturePtr pPicture; - pPicture = (PicturePtr) xalloc(sizeof(PictureRec)); + pPicture = (PicturePtr) malloc(sizeof(PictureRec)); pPicture->pDrawable = 0; pPicture->pFormat = 0; pPicture->pNext = 0; @@ -1000,10 +1000,10 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error) } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) xalloc(sizeof(PictSolidFill)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill)); if (!pPicture->pSourcePict) { *error = BadAlloc; - xfree(pPicture); + free(pPicture); return 0; } pPicture->pSourcePict->type = SourcePictTypeSolidFill; @@ -1034,10 +1034,10 @@ CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2, } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) xalloc(sizeof(PictLinearGradient)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient)); if (!pPicture->pSourcePict) { *error = BadAlloc; - xfree(pPicture); + free(pPicture); return 0; } @@ -1047,7 +1047,7 @@ CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { - xfree(pPicture); + free(pPicture); return 0; } return pPicture; @@ -1083,10 +1083,10 @@ CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) xalloc(sizeof(PictRadialGradient)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictRadialGradient)); if (!pPicture->pSourcePict) { *error = BadAlloc; - xfree(pPicture); + free(pPicture); return 0; } radial = &pPicture->pSourcePict->radial; @@ -1110,7 +1110,7 @@ CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { - xfree(pPicture); + free(pPicture); return 0; } return pPicture; @@ -1134,10 +1134,10 @@ CreateConicalGradientPicture (Picture pid, xPointFixed *center, xFixed angle, } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) xalloc(sizeof(PictConicalGradient)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient)); if (!pPicture->pSourcePict) { *error = BadAlloc; - xfree(pPicture); + free(pPicture); return 0; } @@ -1147,7 +1147,7 @@ CreateConicalGradientPicture (Picture pid, xPointFixed *center, xFixed angle, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { - xfree(pPicture); + free(pPicture); return 0; } return pPicture; @@ -1477,7 +1477,7 @@ SetPictureTransform (PicturePtr pPicture, { if (!pPicture->transform) { - pPicture->transform = (PictTransform *) xalloc (sizeof (PictTransform)); + pPicture->transform = (PictTransform *) malloc (sizeof (PictTransform)); if (!pPicture->transform) return BadAlloc; } @@ -1487,7 +1487,7 @@ SetPictureTransform (PicturePtr pPicture, { if (pPicture->transform) { - xfree (pPicture->transform); + free (pPicture->transform); pPicture->transform = 0; } } @@ -1611,12 +1611,12 @@ FreePicture (void * value, if (--pPicture->refcnt == 0) { if (pPicture->transform) - xfree (pPicture->transform); + free (pPicture->transform); if (!pPicture->pDrawable) { if (pPicture->pSourcePict) { if (pPicture->pSourcePict->type != SourcePictTypeSolidFill) - xfree(pPicture->pSourcePict->linear.stops); - xfree(pPicture->pSourcePict); + free(pPicture->pSourcePict->linear.stops); + free(pPicture->pSourcePict); } } else { ScreenPtr pScreen = pPicture->pDrawable->pScreen; @@ -1647,7 +1647,7 @@ FreePicture (void * value, (*pScreen->DestroyPixmap) ((PixmapPtr)pPicture->pDrawable); } } - xfree (pPicture); + free (pPicture); } return Success; } diff --git a/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c index 5a4114adc..c6cb7bce7 100644 --- a/nx-X11/programs/Xserver/render/render.c +++ b/nx-X11/programs/Xserver/render/render.c @@ -413,7 +413,7 @@ ProcRenderQueryPictFormats (ClientPtr client) ndepth * sizeof (xPictDepth) + nvisual * sizeof (xPictVisual) + numSubpixel * sizeof (CARD32)); - reply = (xRenderQueryPictFormatsReply *) xalloc (rlength); + reply = (xRenderQueryPictFormatsReply *) malloc (rlength); if (!reply) return BadAlloc; memset(reply, 0, rlength); @@ -552,7 +552,7 @@ ProcRenderQueryPictFormats (ClientPtr client) swapl (&reply->numSubpixel, n); } WriteToClient(client, rlength, (char *) reply); - xfree (reply); + free (reply); return client->noClientException; } #endif /* NXAGENT_SERVER */ @@ -588,7 +588,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client) num = pFormat->index.nvalues; rlength = (sizeof (xRenderQueryPictIndexValuesReply) + num * sizeof(xIndexValue)); - reply = (xRenderQueryPictIndexValuesReply *) xalloc (rlength); + reply = (xRenderQueryPictIndexValuesReply *) malloc (rlength); if (!reply) return BadAlloc; @@ -617,7 +617,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client) } WriteToClient(client, rlength, (char *) reply); - xfree(reply); + free(reply); return (client->noClientException); } @@ -1139,7 +1139,7 @@ ProcRenderAddGlyphs (ClientPtr client) glyphsBase = glyphsLocal; else { - glyphsBase = (GlyphNewPtr) Xalloc (nglyphs * sizeof (GlyphNewRec)); + glyphsBase = (GlyphNewPtr) malloc (nglyphs * sizeof (GlyphNewRec)); if (!glyphsBase) return BadAlloc; } @@ -1196,16 +1196,16 @@ ProcRenderAddGlyphs (ClientPtr client) } if (glyphsBase != glyphsLocal) - Xfree (glyphsBase); + free (glyphsBase); return client->noClientException; bail: while (glyphs != glyphsBase) { --glyphs; - xfree (glyphs->glyph); + free (glyphs->glyph); } if (glyphsBase != glyphsLocal) - Xfree (glyphsBase); + free (glyphsBase); return err; } @@ -1533,23 +1533,23 @@ ProcRenderCreateCursor (ClientPtr client) if ( stuff->x > width || stuff->y > height ) return (BadMatch); - argbbits = xalloc (width * height * sizeof (CARD32)); + argbbits = malloc (width * height * sizeof (CARD32)); if (!argbbits) return (BadAlloc); stride = BitmapBytePad(width); nbytes_mono = stride*height; - srcbits = (unsigned char *)xalloc(nbytes_mono); + srcbits = (unsigned char *)malloc(nbytes_mono); if (!srcbits) { - xfree (argbbits); + free (argbbits); return (BadAlloc); } - mskbits = (unsigned char *)xalloc(nbytes_mono); + mskbits = (unsigned char *)malloc(nbytes_mono); if (!mskbits) { - xfree(argbbits); - xfree(srcbits); + free(argbbits); + free(srcbits); return (BadAlloc); } bzero ((char *) mskbits, nbytes_mono); @@ -1571,26 +1571,26 @@ ProcRenderCreateCursor (ClientPtr client) pFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8); if (!pFormat) { - xfree (argbbits); - xfree (srcbits); - xfree (mskbits); + free (argbbits); + free (srcbits); + free (mskbits); return (BadImplementation); } pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32); if (!pPixmap) { - xfree (argbbits); - xfree (srcbits); - xfree (mskbits); + free (argbbits); + free (srcbits); + free (mskbits); return (BadAlloc); } pPicture = CreatePicture (0, &pPixmap->drawable, pFormat, 0, 0, client, &error); if (!pPicture) { - xfree (argbbits); - xfree (srcbits); - xfree (mskbits); + free (argbbits); + free (srcbits); + free (mskbits); return error; } (*pScreen->DestroyPixmap) (pPixmap); @@ -1674,7 +1674,7 @@ ProcRenderCreateCursor (ClientPtr client) } else { - xfree (argbbits); + free (argbbits); argbbits = 0; } @@ -1748,7 +1748,7 @@ ProcRenderQueryFilters (ClientPtr client) } len = ((nnames + 1) >> 1) + ((nbytesName + 3) >> 2); total_bytes = sizeof (xRenderQueryFiltersReply) + (len << 2); - reply = (xRenderQueryFiltersReply *) xalloc (total_bytes); + reply = (xRenderQueryFiltersReply *) malloc (total_bytes); if (!reply) return BadAlloc; aliases = (INT16 *) (reply + 1); @@ -1819,7 +1819,7 @@ ProcRenderQueryFilters (ClientPtr client) swapl(&reply->numFilters, n); } WriteToClient(client, total_bytes, (char *) reply); - xfree (reply); + free (reply); return(client->noClientException); } @@ -1862,7 +1862,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) if (client->req_len & 1) return BadLength; ncursor = (client->req_len - (SIZEOF(xRenderCreateAnimCursorReq) >> 2)) >> 1; - cursors = xalloc (ncursor * (sizeof (CursorPtr) + sizeof (CARD32))); + cursors = malloc (ncursor * (sizeof (CursorPtr) + sizeof (CARD32))); if (!cursors) return BadAlloc; deltas = (CARD32 *) (cursors + ncursor); @@ -1873,7 +1873,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) RT_CURSOR, SecurityReadAccess); if (!cursors[i]) { - xfree (cursors); + free (cursors); client->errorValue = elt->cursor; return BadCursor; } @@ -1881,7 +1881,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) elt++; } ret = AnimCursorCreate (cursors, deltas, ncursor, &pCursor); - xfree (cursors); + free (cursors); if (ret != Success) return ret; @@ -2681,7 +2681,7 @@ PanoramiXRenderCreatePicture (ClientPtr client) if(!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass( client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) return BadDrawable; - if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; newPict->info[0].id = stuff->pid; @@ -2707,7 +2707,7 @@ PanoramiXRenderCreatePicture (ClientPtr client) if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else - xfree(newPict); + free(newPict); return (result); } |