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/hw/nxagent/NXrender.c | |
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/hw/nxagent/NXrender.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXrender.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c index 93760f482..d14b47866 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c @@ -224,7 +224,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); @@ -362,7 +362,7 @@ ProcRenderQueryPictFormats (ClientPtr client) swapl (&reply->numSubpixel, n); } WriteToClient(client, rlength, (char *) reply); - xfree (reply); + free (reply); return client->noClientException; } @@ -712,7 +712,7 @@ ProcRenderTrapezoids (ClientPtr client) { if (pFormat != NULL) { - nxagentTrapezoidExtents = (BoxPtr) xalloc(sizeof(BoxRec)); + nxagentTrapezoidExtents = (BoxPtr) malloc(sizeof(BoxRec)); miTrapezoidBounds (ntraps, (xTrapezoid *) &stuff[1], nxagentTrapezoidExtents); } @@ -730,7 +730,7 @@ ProcRenderTrapezoids (ClientPtr client) if (nxagentTrapezoidExtents != NullBox) { - xfree(nxagentTrapezoidExtents); + free(nxagentTrapezoidExtents); nxagentTrapezoidExtents = NullBox; } @@ -996,7 +996,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) return BadAlloc; } - elementsBase = xalloc(nlist * sizeof(XGlyphElt8)); + elementsBase = malloc(nlist * sizeof(XGlyphElt8)); if (!elementsBase) return BadAlloc; @@ -1098,7 +1098,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) * after the X requests. */ - nxagentGlyphsExtents = (BoxPtr) xalloc(sizeof(BoxRec)); + nxagentGlyphsExtents = (BoxPtr) malloc(sizeof(BoxRec)); miGlyphExtents(nlist, listsBase, glyphsBase, nxagentGlyphsExtents); @@ -1132,7 +1132,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) glyphsBase); } - xfree(nxagentGlyphsExtents); + free(nxagentGlyphsExtents); nxagentGlyphsExtents = NullBox; if (glyphsBase != glyphsLocal) @@ -1140,7 +1140,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) if (listsBase != listsLocal) DEALLOCATE_LOCAL (listsBase); - xfree(elementsBase); + free(elementsBase); return client->noClientException; } @@ -1219,23 +1219,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); @@ -1257,26 +1257,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); @@ -1360,7 +1360,7 @@ ProcRenderCreateCursor (ClientPtr client) } else { - xfree (argbbits); + free (argbbits); argbbits = 0; } @@ -1477,7 +1477,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); @@ -1488,7 +1488,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) RT_CURSOR, SecurityReadAccess); if (!cursors[i]) { - xfree (cursors); + free (cursors); client->errorValue = elt->cursor; return BadCursor; } @@ -1496,7 +1496,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) elt++; } ret = AnimCursorCreate (cursors, deltas, ncursor, &pCursor); - xfree (cursors); + free (cursors); if (ret != Success) return ret; |