From 3f3ff971ecff9936cebafc813af9193b97bba89c Mon Sep 17 00:00:00 2001 From: Mikhail Gusarov Date: Thu, 6 May 2010 01:44:06 +0700 Subject: Replace X-allocation functions with their C89 counterparts The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov Reviewed-by: Peter Hutterer --- glx/glxcmds.c | 26 +++++++++++++------------- glx/glxdri.c | 38 +++++++++++++++++++------------------- glx/glxdri2.c | 22 +++++++++++----------- glx/glxdricommon.c | 2 +- glx/glxdriswrast.c | 16 ++++++++-------- glx/glxext.c | 12 ++++++------ glx/glxscreens.c | 8 ++++---- glx/indirect_util.c | 2 +- glx/single2.c | 24 ++++++++++++------------ glx/single2swap.c | 4 ++-- glx/unpack.h | 2 +- glx/xfont.c | 4 ++-- 12 files changed, 80 insertions(+), 80 deletions(-) (limited to 'glx') diff --git a/glx/glxcmds.c b/glx/glxcmds.c index ec3bbe6a3..25346f923 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -196,7 +196,7 @@ __glXContextDestroy(__GLXcontext *context) static void __glXdirectContextDestroy(__GLXcontext *context) { __glXContextDestroy(context); - xfree(context); + free(context); } static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen, @@ -205,7 +205,7 @@ static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen, { __GLXcontext *context; - context = xcalloc (1, sizeof (__GLXcontext)); + context = calloc(1, sizeof (__GLXcontext)); if (context == NULL) return NULL; @@ -407,9 +407,9 @@ static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc) ** Didn't find a free slot, so we'll have to grow the table. */ if (!num) { - table = (__GLXcontext **) xalloc(sizeof(__GLXcontext *)); + table = (__GLXcontext **) malloc(sizeof(__GLXcontext *)); } else { - table = (__GLXcontext **) xrealloc(table, + table = (__GLXcontext **) realloc(table, (num+1)*sizeof(__GLXcontext *)); } table[num] = glxc; @@ -1527,7 +1527,7 @@ DoQueryContext(__GLXclientState *cl, GLXContextID gcId) reply.n = nProps; nReplyBytes = reply.length << 2; - sendBuf = (int *)xalloc((size_t)nReplyBytes); + sendBuf = (int *)malloc((size_t)nReplyBytes); if (sendBuf == NULL) { return __glXError(GLXBadContext); /* XXX: Is this correct? */ } @@ -1545,7 +1545,7 @@ DoQueryContext(__GLXclientState *cl, GLXContextID gcId) WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)&reply); WriteToClient(client, nReplyBytes, (char *)sendBuf); } - xfree((char *)sendBuf); + free((char *)sendBuf); return Success; } @@ -1947,9 +1947,9 @@ int __glXDisp_RenderLarge(__GLXclientState *cl, GLbyte *pc) */ if (cl->largeCmdBufSize < cmdlen) { if (!cl->largeCmdBuf) { - cl->largeCmdBuf = (GLbyte *) xalloc(cmdlen); + cl->largeCmdBuf = (GLbyte *) malloc(cmdlen); } else { - cl->largeCmdBuf = (GLbyte *) xrealloc(cl->largeCmdBuf, cmdlen); + cl->largeCmdBuf = (GLbyte *) realloc(cl->largeCmdBuf, cmdlen); } if (!cl->largeCmdBuf) { return BadAlloc; @@ -2351,7 +2351,7 @@ int __glXDisp_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc) reply.n = n; /* Allocate buffer to make sure it's a multiple of 4 bytes big.*/ - buf = (char *) xalloc(length << 2); + buf = (char *) malloc(length << 2); if (buf == NULL) return BadAlloc; memcpy(buf, pGlxScreen->GLXextensions, n); @@ -2363,7 +2363,7 @@ int __glXDisp_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc) WriteToClient(client, (int)(length << 2), (char *)buf); } - xfree(buf); + free(buf); return Success; } @@ -2407,7 +2407,7 @@ int __glXDisp_QueryServerString(__GLXclientState *cl, GLbyte *pc) reply.length = length; reply.n = n; - buf = (char *) xalloc(length << 2); + buf = (char *) malloc(length << 2); if (buf == NULL) { return BadAlloc; } @@ -2420,7 +2420,7 @@ int __glXDisp_QueryServerString(__GLXclientState *cl, GLbyte *pc) WriteToClient(client, (int)(length << 2), buf); } - xfree(buf); + free(buf); return Success; } @@ -2432,7 +2432,7 @@ int __glXDisp_ClientInfo(__GLXclientState *cl, GLbyte *pc) cl->GLClientmajorVersion = req->major; cl->GLClientminorVersion = req->minor; if (cl->GLClientextensions) - xfree(cl->GLClientextensions); + free(cl->GLClientextensions); buf = (const char *)(req+1); cl->GLClientextensions = xstrdup(buf); diff --git a/glx/glxdri.c b/glx/glxdri.c index 1d8c902c4..131efcf39 100644 --- a/glx/glxdri.c +++ b/glx/glxdri.c @@ -242,7 +242,7 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) __glXDrawableRelease(drawable); - xfree(private); + free(private); } static GLboolean @@ -299,7 +299,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext) __glXleaveServer(GL_FALSE); __glXContextDestroy(&context->base); - xfree(context); + free(context); } static int @@ -495,7 +495,7 @@ nooverride: unsigned pitch = PixmapBytePad(pixmap->drawable.width, pixmap->drawable.depth); - data = xalloc(pitch * pixmap->drawable.height); + data = malloc(pitch * pixmap->drawable.height); __glXenterServer(GL_FALSE); pScreen->GetImage(&pixmap->drawable, 0 /*pixmap->drawable.x*/, @@ -526,7 +526,7 @@ nooverride: type, data) ); - xfree(data); + free(data); } else if (!override) { int i, numRects; BoxPtr p; @@ -541,7 +541,7 @@ nooverride: { unsigned pitch = PixmapBytePad(p[i].x2 - p[i].x1, pixmap->drawable.depth); - void *data = xalloc(pitch * (p[i].y2 - p[i].y1)); + void *data = malloc(pitch * (p[i].y2 - p[i].y1)); __glXenterServer(GL_FALSE); pScreen->GetImage(&pixmap->drawable, /*pixmap->drawable.x +*/ p[i].x1, @@ -567,7 +567,7 @@ nooverride: type, data) ); - xfree(data); + free(data); } } @@ -607,7 +607,7 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen) __glXScreenDestroy(baseScreen); - xfree(screen); + free(screen); } static __GLXcontext * @@ -634,7 +634,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, if (baseShareContext && baseShareContext->isDirect) return NULL; - context = xcalloc(1, sizeof *context); + context = calloc(1, sizeof *context); if (context == NULL) return NULL; @@ -675,7 +675,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, __glXenterServer(GL_FALSE); retval = DRIDestroyContext(baseScreen->pScreen, context->hwContextID); __glXleaveServer(GL_FALSE); - xfree(context); + free(context); return NULL; } @@ -697,13 +697,13 @@ __glXDRIscreenCreateDrawable(ClientPtr client, GLboolean retval; drm_drawable_t hwDrawable; - private = xcalloc(1, sizeof *private); + private = calloc(1, sizeof *private); if (private == NULL) return NULL; if (!__glXDrawableInit(&private->base, screen, pDraw, type, glxDrawId, glxConfig)) { - xfree(private); + free(private); return NULL; } @@ -719,7 +719,7 @@ __glXDRIscreenCreateDrawable(ClientPtr client, __glXleaveServer(GL_FALSE); if (!retval) { - xfree(private); + free(private); return NULL; } @@ -735,7 +735,7 @@ __glXDRIscreenCreateDrawable(ClientPtr client, __glXenterServer(GL_FALSE); DRIDestroyDrawable(screen->pScreen, serverClient, pDraw); __glXleaveServer(GL_FALSE); - xfree(private); + free(private); return NULL; } @@ -772,7 +772,7 @@ getDrawableInfo(__DRIdrawable *driDrawable, if (retval && *numClipRects > 0) { size = sizeof (drm_clip_rect_t) * *numClipRects; - *ppClipRects = xalloc (size); + *ppClipRects = malloc(size); /* Clip cliprects to screen dimensions (redirected windows) */ if (*ppClipRects != NULL) { @@ -792,7 +792,7 @@ getDrawableInfo(__DRIdrawable *driDrawable, if (*numClipRects != j) { *numClipRects = j; - *ppClipRects = xrealloc (*ppClipRects, + *ppClipRects = realloc(*ppClipRects, sizeof (drm_clip_rect_t) * *numClipRects); } @@ -806,7 +806,7 @@ getDrawableInfo(__DRIdrawable *driDrawable, if (retval && *numBackClipRects > 0) { size = sizeof (drm_clip_rect_t) * *numBackClipRects; - *ppBackClipRects = xalloc (size); + *ppBackClipRects = malloc(size); if (*ppBackClipRects != NULL) memcpy (*ppBackClipRects, pBackClipRects, size); else @@ -977,7 +977,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) return NULL; } - screen = xcalloc(1, sizeof *screen); + screen = calloc(1, sizeof *screen); if (screen == NULL) return NULL; @@ -1148,7 +1148,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); if (buffer_size > 0) { if (screen->base.GLXextensions != NULL) { - xfree(screen->base.GLXextensions); + free(screen->base.GLXextensions); } screen->base.GLXextensions = xnfalloc(buffer_size); @@ -1183,7 +1183,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) if (screen->driver) dlclose(screen->driver); - xfree(screen); + free(screen); LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); diff --git a/glx/glxdri2.c b/glx/glxdri2.c index bad451658..4f8e0207e 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -107,7 +107,7 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) __glXDrawableRelease(drawable); - xfree(private); + free(private); } static void @@ -248,7 +248,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext) (*screen->core->destroyContext)(context->driContext); __glXContextDestroy(&context->base); - xfree(context); + free(context); } static int @@ -386,7 +386,7 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen) __glXScreenDestroy(baseScreen); - xfree(screen); + free(screen); } static __GLXcontext * @@ -405,7 +405,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, else driShare = NULL; - context = xcalloc(1, sizeof *context); + context = calloc(1, sizeof *context); if (context == NULL) return NULL; @@ -422,7 +422,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, config->driConfig, driShare, context); if (context->driContext == NULL) { - xfree(context); + free(context); return NULL; } @@ -442,14 +442,14 @@ __glXDRIscreenCreateDrawable(ClientPtr client, __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; __GLXDRIdrawable *private; - private = xcalloc(1, sizeof *private); + private = calloc(1, sizeof *private); if (private == NULL) return NULL; private->screen = driScreen; if (!__glXDrawableInit(&private->base, screen, pDraw, type, glxDrawId, glxConfig)) { - xfree(private); + free(private); return NULL; } @@ -460,7 +460,7 @@ __glXDRIscreenCreateDrawable(ClientPtr client, private->base.waitX = __glXDRIdrawableWaitX; if (DRI2CreateDrawable(client, pDraw, drawId)) { - xfree(private); + free(private); return NULL; } @@ -676,7 +676,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) const __DRIconfig **driConfigs; int i; - screen = xcalloc(1, sizeof *screen); + screen = calloc(1, sizeof *screen); if (screen == NULL) return NULL; @@ -759,7 +759,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); if (buffer_size > 0) { if (screen->base.GLXextensions != NULL) { - xfree(screen->base.GLXextensions); + free(screen->base.GLXextensions); } screen->base.GLXextensions = xnfalloc(buffer_size); @@ -793,7 +793,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) if (screen->driver) dlclose(screen->driver); - xfree(screen); + free(screen); LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c index 454aa5587..86797a0ef 100644 --- a/glx/glxdricommon.c +++ b/glx/glxdricommon.c @@ -127,7 +127,7 @@ createModeFromConfig(const __DRIcoreExtension *core, unsigned int attrib, value; int i; - config = xalloc(sizeof *config); + config = malloc(sizeof *config); config->driConfig = driConfig; diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c index 4ba448afc..a0054515b 100644 --- a/glx/glxdriswrast.c +++ b/glx/glxdriswrast.c @@ -104,7 +104,7 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) __glXDrawableRelease(drawable); - xfree(private); + free(private); } static GLboolean @@ -138,7 +138,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext) (*screen->core->destroyContext)(context->driContext); __glXContextDestroy(&context->base); - xfree(context); + free(context); } static int @@ -254,7 +254,7 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen) __glXScreenDestroy(baseScreen); - xfree(screen); + free(screen); } static __GLXcontext * @@ -274,7 +274,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, else driShare = NULL; - context = xcalloc(1, sizeof *context); + context = calloc(1, sizeof *context); if (context == NULL) return NULL; @@ -315,14 +315,14 @@ __glXDRIscreenCreateDrawable(ClientPtr client, ScreenPtr pScreen = driScreen->base.pScreen; - private = xcalloc(1, sizeof *private); + private = calloc(1, sizeof *private); if (private == NULL) return NULL; private->screen = driScreen; if (!__glXDrawableInit(&private->base, screen, pDraw, type, glxDrawId, glxConfig)) { - xfree(private); + free(private); return NULL; } @@ -450,7 +450,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) const __DRIconfig **driConfigs; int i; - screen = xcalloc(1, sizeof *screen); + screen = calloc(1, sizeof *screen); if (screen == NULL) return NULL; @@ -527,7 +527,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) if (screen->driver) dlclose(screen->driver); - xfree(screen); + free(screen); LogMessage(X_ERROR, "GLX: could not load software renderer\n"); diff --git a/glx/glxext.c b/glx/glxext.c index 89e58b0b0..593e05309 100644 --- a/glx/glxext.c +++ b/glx/glxext.c @@ -205,8 +205,8 @@ GLboolean __glXFreeContext(__GLXcontext *cx) { if (cx->idExists || cx->isCurrent) return GL_FALSE; - if (cx->feedbackBuf) xfree(cx->feedbackBuf); - if (cx->selectBuf) xfree(cx->selectBuf); + if (cx->feedbackBuf) free(cx->feedbackBuf); + if (cx->selectBuf) free(cx->selectBuf); if (cx == __glXLastContext) { __glXFlushContextCache(); } @@ -323,10 +323,10 @@ glxClientCallback (CallbackListPtr *list, } } - if (cl->returnBuf) xfree(cl->returnBuf); - if (cl->largeCmdBuf) xfree(cl->largeCmdBuf); - if (cl->currentContexts) xfree(cl->currentContexts); - if (cl->GLClientextensions) xfree(cl->GLClientextensions); + if (cl->returnBuf) free(cl->returnBuf); + if (cl->largeCmdBuf) free(cl->largeCmdBuf); + if (cl->currentContexts) free(cl->currentContexts); + if (cl->GLClientextensions) free(cl->GLClientextensions); break; default: diff --git a/glx/glxscreens.c b/glx/glxscreens.c index b75aea6f2..ffe70c31c 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -378,7 +378,7 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) pGlxScreen->numFBConfigs = i; pGlxScreen->visuals = - xcalloc(pGlxScreen->numFBConfigs, sizeof (__GLXconfig *)); + calloc(pGlxScreen->numFBConfigs, sizeof (__GLXconfig *)); /* First, try to choose featureful FBconfigs for the existing X visuals. * Note that if multiple X visuals end up with the same FBconfig being @@ -436,7 +436,7 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) void __glXScreenDestroy(__GLXscreen *screen) { - xfree(screen->GLXvendor); - xfree(screen->GLXextensions); - xfree(screen->GLextensions); + free(screen->GLXvendor); + free(screen->GLXextensions); + free(screen->GLextensions); } diff --git a/glx/indirect_util.c b/glx/indirect_util.c index 44309104e..46a270695 100644 --- a/glx/indirect_util.c +++ b/glx/indirect_util.c @@ -88,7 +88,7 @@ __glXGetAnswerBuffer( __GLXclientState * cl, size_t required_size, intptr_t temp_buf; if ( cl->returnBufSize < worst_case_size ) { - void * temp = xrealloc( cl->returnBuf, worst_case_size ); + void * temp = realloc( cl->returnBuf, worst_case_size ); if ( temp == NULL ) { return NULL; diff --git a/glx/single2.c b/glx/single2.c index 50a59ed71..070062691 100644 --- a/glx/single2.c +++ b/glx/single2.c @@ -62,7 +62,7 @@ int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) size = *(GLsizei *)(pc+0); type = *(GLenum *)(pc+4); if (cx->feedbackBufSize < size) { - cx->feedbackBuf = (GLfloat *) xrealloc(cx->feedbackBuf, + cx->feedbackBuf = (GLfloat *) realloc(cx->feedbackBuf, (size_t)size * __GLX_SIZE_FLOAT32); if (!cx->feedbackBuf) { @@ -90,7 +90,7 @@ int __glXDisp_SelectBuffer(__GLXclientState *cl, GLbyte *pc) pc += __GLX_SINGLE_HDR_SIZE; size = *(GLsizei *)(pc+0); if (cx->selectBufSize < size) { - cx->selectBuf = (GLuint *) xrealloc(cx->selectBuf, + cx->selectBuf = (GLuint *) realloc(cx->selectBuf, (size_t) size * __GLX_SIZE_CARD32); if (!cx->selectBuf) { @@ -261,21 +261,21 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string) clen = strlen(cext_string); slen = strlen(sext_string); if (clen > slen) { - combo_string = (char *) xalloc(slen + 2); - s1 = (char *) xalloc(slen + 2); + combo_string = (char *) malloc(slen + 2); + s1 = (char *) malloc(slen + 2); if (s1) strcpy(s1, sext_string); s2 = cext_string; } else { - combo_string = (char *) xalloc(clen + 2); - s1 = (char *) xalloc(clen + 2); + combo_string = (char *) malloc(clen + 2); + s1 = (char *) malloc(clen + 2); if (s1) strcpy(s1, cext_string); s2 = sext_string; } if (!combo_string || !s1) { if (combo_string) - xfree(combo_string); + free(combo_string); if (s1) - xfree(s1); + free(s1); return NULL; } combo_string[0] = '\0'; @@ -302,7 +302,7 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string) /* Get next extension token */ token = strtok( NULL, SEPARATOR); } - xfree(s1); + free(s1); return combo_string; } @@ -349,13 +349,13 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) buf = __glXcombine_strings(buf1, cx->pGlxScreen->GLextensions); if (buf1 != NULL) { - xfree(buf1); + free(buf1); } string = buf; } else if ( name == GL_VERSION ) { if ( atof( string ) > atof( GLServerVersion ) ) { - buf = xalloc( strlen( string ) + strlen( GLServerVersion ) + 4 ); + buf = malloc( strlen( string ) + strlen( GLServerVersion ) + 4 ); if ( buf == NULL ) { string = GLServerVersion; } @@ -380,7 +380,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) __GLX_SEND_HEADER(); WriteToClient(client, length, (char *) string); if (buf != NULL) - xfree(buf); + free(buf); return Success; } diff --git a/glx/single2swap.c b/glx/single2swap.c index cf83bdc88..04e50b407 100644 --- a/glx/single2swap.c +++ b/glx/single2swap.c @@ -62,7 +62,7 @@ int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) size = *(GLsizei *)(pc+0); type = *(GLenum *)(pc+4); if (cx->feedbackBufSize < size) { - cx->feedbackBuf = (GLfloat *) xrealloc(cx->feedbackBuf, + cx->feedbackBuf = (GLfloat *) realloc(cx->feedbackBuf, (size_t) size * __GLX_SIZE_FLOAT32); if (!cx->feedbackBuf) { @@ -93,7 +93,7 @@ int __glXDispSwap_SelectBuffer(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(pc+0); size = *(GLsizei *)(pc+0); if (cx->selectBufSize < size) { - cx->selectBuf = (GLuint *) xrealloc(cx->selectBuf, + cx->selectBuf = (GLuint *) realloc(cx->selectBuf, (size_t) size * __GLX_SIZE_CARD32); if (!cx->selectBuf) { diff --git a/glx/unpack.h b/glx/unpack.h index 90cb71bd7..a4e6d7e84 100644 --- a/glx/unpack.h +++ b/glx/unpack.h @@ -86,7 +86,7 @@ extern xGLXSingleReply __glXReply; 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/glx/xfont.c b/glx/xfont.c index e3c7f32b1..35fad4d5a 100644 --- a/glx/xfont.c +++ b/glx/xfont.c @@ -76,7 +76,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) p = buf; allocbuf = 0; } else { - p = (unsigned char *) xalloc(allocBytes); + p = (unsigned char *) malloc(allocBytes); if (!p) return BadAlloc; allocbuf = p; @@ -100,7 +100,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) allocbuf ? allocbuf : buf) ); if (allocbuf) { - xfree(allocbuf); + free(allocbuf); } return Success; #undef __GL_CHAR_BUF_SIZE -- cgit v1.2.3