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/fb/fbpseudocolor.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/fb/fbpseudocolor.c')
-rw-r--r-- | nx-X11/programs/Xserver/fb/fbpseudocolor.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/nx-X11/programs/Xserver/fb/fbpseudocolor.c b/nx-X11/programs/Xserver/fb/fbpseudocolor.c index 51f21ed21..c22309a93 100644 --- a/nx-X11/programs/Xserver/fb/fbpseudocolor.c +++ b/nx-X11/programs/Xserver/fb/fbpseudocolor.c @@ -271,13 +271,13 @@ xxCreateScreenResources(ScreenPtr pScreen) if (pScrPriv->addr) pBits = pScrPriv->addr; else - pBits = xalloc(pScreen->width * pScreen->height + pBits = malloc(pScreen->width * pScreen->height * (BitsPerPixel(depth) >> 3)); if (!pBits) return FALSE; pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth); if (!pPixmap) { - xfree(pBits); + free(pBits); return FALSE; } if (!(*pScreen->ModifyPixmapHeader)(pPixmap, pScreen->width, @@ -285,7 +285,7 @@ xxCreateScreenResources(ScreenPtr pScreen) BitsPerPixel(depth), PixmapBytePad(pScreen->width, depth), pBits)) { - xfree(pBits); + free(pBits); return FALSE; } if (pScreen->rootDepth == pScrPriv->myDepth) { @@ -295,7 +295,7 @@ xxCreateScreenResources(ScreenPtr pScreen) PixmapBytePad(pScreen->width, pScrPriv->depth), 0)) { - xfree(pBits); + free(pBits); return FALSE; } } @@ -328,9 +328,9 @@ xxCloseScreen (int iScreen, ScreenPtr pScreen) unwrap (pScrPriv,pScreen, CloseScreen); ret = pScreen->CloseScreen(iScreen,pScreen); - xfree(pScrPriv->pBits); - xfree(pScrPriv->InstalledCmaps); - xfree(pScrPriv); + free(pScrPriv->pBits); + free(pScrPriv->InstalledCmaps); + free(pScrPriv); return TRUE; } @@ -370,11 +370,11 @@ xxInitColormapPrivate(ColormapPtr pmap) if (xxMyVisual(pmap->pScreen,pmap->pVisual->vid)) { DBG("CreateColormap\n"); - pCmapPriv = (xxCmapPrivPtr) xalloc (sizeof (xxCmapPrivRec)); + pCmapPriv = (xxCmapPrivPtr) malloc (sizeof (xxCmapPrivRec)); if (!pCmapPriv) return FALSE; pmap->devPrivates[xxColormapPrivateIndex].ptr = (void *) pCmapPriv; - cmap = xalloc(sizeof (CARD32) * (1 << pScrPriv->myDepth)); + cmap = malloc(sizeof (CARD32) * (1 << pScrPriv->myDepth)); if (!cmap) return FALSE; @@ -456,8 +456,8 @@ xxDestroyColormap(ColormapPtr pmap) tmpCmapPriv = tmpCmapPriv->next; } - xfree(pCmapPriv->cmap); - xfree(pCmapPriv); + free(pCmapPriv->cmap); + free(pCmapPriv); } unwrap(pScrPriv,pmap->pScreen, DestroyColormap); @@ -1109,7 +1109,7 @@ xxSetup(ScreenPtr pScreen, int myDepth, int baseDepth, char* addr, xxSyncFunc sy if (!AllocateGCPrivate (pScreen, xxGCPrivateIndex, sizeof (xxGCPrivRec))) return FALSE; - pScrPriv = (xxScrPrivPtr) xalloc (sizeof (xxScrPrivRec)); + pScrPriv = (xxScrPrivPtr) malloc (sizeof (xxScrPrivRec)); if (!pScrPriv) return FALSE; @@ -1150,7 +1150,7 @@ xxSetup(ScreenPtr pScreen, int myDepth, int baseDepth, char* addr, xxSyncFunc sy pScrPriv->sync = sync; pScreen->maxInstalledCmaps += MAX_NUM_XX_INSTALLED_CMAPS; - pScrPriv->InstalledCmaps = xcalloc(MAX_NUM_XX_INSTALLED_CMAPS, + pScrPriv->InstalledCmaps = calloc(MAX_NUM_XX_INSTALLED_CMAPS, sizeof(ColormapPtr)); if (!pScrPriv->InstalledCmaps) return FALSE; |