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/GL | |
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/GL')
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/glxcmds.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/glximports.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/glxscreens.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/glxutil.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/unpack.h | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c | 4 |
7 files changed, 20 insertions, 20 deletions
diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmds.c b/nx-X11/programs/Xserver/GL/glx/glxcmds.c index c62585507..7d8fbe81f 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxcmds.c +++ b/nx-X11/programs/Xserver/GL/glx/glxcmds.c @@ -2138,7 +2138,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) reply.length = length; reply.n = n; - if ((buf = (char *) Xalloc(length << 2)) == NULL) { + if ((buf = (char *) malloc(length << 2)) == NULL) { return BadAlloc; } __glXStrncpy(buf, ptr, n); diff --git a/nx-X11/programs/Xserver/GL/glx/glximports.c b/nx-X11/programs/Xserver/GL/glx/glximports.c index 435caca58..f966ca4df 100644 --- a/nx-X11/programs/Xserver/GL/glx/glximports.c +++ b/nx-X11/programs/Xserver/GL/glx/glximports.c @@ -50,7 +50,7 @@ void *__glXImpMalloc(__GLcontext *gc, size_t size) if (size == 0) { return NULL; } - addr = xalloc(size); + addr = malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -67,7 +67,7 @@ void *__glXImpCalloc(__GLcontext *gc, size_t numElements, size_t elementSize) return NULL; } size = numElements * elementSize; - addr = xalloc(size); + addr = malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -81,7 +81,7 @@ void *__glXImpCalloc(__GLcontext *gc, size_t numElements, size_t elementSize) void __glXImpFree(__GLcontext *gc, void *addr) { if (addr) { - xfree(addr); + free(addr); } } @@ -91,15 +91,15 @@ void *__glXImpRealloc(__GLcontext *gc, void *addr, size_t newSize) if (addr) { if (newSize == 0) { - xfree(addr); + free(addr); return NULL; } - newAddr = xrealloc(addr, newSize); + newAddr = realloc(addr, newSize); } else { if (newSize == 0) { return NULL; } - newAddr = xalloc(newSize); + newAddr = malloc(newSize); } if (newAddr == NULL) { return NULL; /* XXX: out of memory error */ diff --git a/nx-X11/programs/Xserver/GL/glx/glxscreens.c b/nx-X11/programs/Xserver/GL/glx/glxscreens.c index 58b38b1a2..1cbc0baf7 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxscreens.c +++ b/nx-X11/programs/Xserver/GL/glx/glxscreens.c @@ -366,9 +366,9 @@ void __glXScreenReset(void) __glXFree(__glXActiveScreens[i].GLXextensions); __glXFree(__glXActiveScreens[i].GLextensions); } - xfree(__glXActiveScreens); - xfree(__glXHyperpipeFuncs); - xfree(__glXSwapBarrierFuncs); + free(__glXActiveScreens); + free(__glXHyperpipeFuncs); + free(__glXSwapBarrierFuncs); __glXNumHyperpipeFuncs = 0; __glXNumSwapBarrierFuncs = 0; __glXHyperpipeFuncs = NULL; diff --git a/nx-X11/programs/Xserver/GL/glx/glxutil.c b/nx-X11/programs/Xserver/GL/glx/glxutil.c index 03bc19f63..b95a21f89 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxutil.c +++ b/nx-X11/programs/Xserver/GL/glx/glxutil.c @@ -68,7 +68,7 @@ __glXMalloc(size_t size) if (size == 0) { return NULL; } - addr = (void *) xalloc(size); + addr = (void *) malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -86,7 +86,7 @@ __glXCalloc(size_t numElements, size_t elementSize) return NULL; } size = numElements * elementSize; - addr = (void *) xalloc(size); + addr = (void *) malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -102,16 +102,16 @@ __glXRealloc(void *addr, size_t newSize) if (addr) { if (newSize == 0) { - xfree(addr); + free(addr); return NULL; } else { - newAddr = xrealloc(addr, newSize); + newAddr = realloc(addr, newSize); } } else { if (newSize == 0) { return NULL; } else { - newAddr = xalloc(newSize); + newAddr = malloc(newSize); } } if (newAddr == NULL) { @@ -125,7 +125,7 @@ void __glXFree(void *addr) { if (addr) { - xfree(addr); + free(addr); } } diff --git a/nx-X11/programs/Xserver/GL/glx/unpack.h b/nx-X11/programs/Xserver/GL/glx/unpack.h index 94bdae8f9..d1150c32b 100644 --- a/nx-X11/programs/Xserver/GL/glx/unpack.h +++ b/nx-X11/programs/Xserver/GL/glx/unpack.h @@ -93,7 +93,7 @@ extern xGLXSingleReply __glXReply; else if ((size) > sizeof(answerBuffer)) { \ int bump; \ if ((cl)->returnBufSize < (size)+(align)) { \ - (cl)->returnBuf = (GLbyte*)Xrealloc((cl)->returnBuf, \ + (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \ (size)+(align)); \ if (!(cl)->returnBuf) { \ return BadAlloc; \ diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c index 19b5be637..6ec2164ba 100644 --- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c +++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c @@ -516,7 +516,7 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp, /* Free the private list created by DDX HW driver */ if (visualPrivates) - xfree(visualPrivates); + free(visualPrivates); visualPrivates = NULL; return TRUE; diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c index 1889bdabd..057acb6d3 100644 --- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c +++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c @@ -52,7 +52,7 @@ XMesaImage *XMesaCreateImage(int bitsPerPixel, int width, int height, char *data { XMesaImage *image; - image = (XMesaImage *)xalloc(sizeof(XMesaImage)); + image = (XMesaImage *)malloc(sizeof(XMesaImage)); if (image) { image->width = width; @@ -70,7 +70,7 @@ void XMesaDestroyImage(XMesaImage *image) { if (image->data) free(image->data); - xfree(image); + free(image); } unsigned long XMesaGetPixel(XMesaImage *image, int x, int y) |