summaryrefslogtreecommitdiff
path: root/glx/single2.c
diff options
context:
space:
mode:
Diffstat (limited to 'glx/single2.c')
-rw-r--r--glx/single2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/glx/single2.c b/glx/single2.c
index 56ad86dc6..07b89a823 100644
--- a/glx/single2.c
+++ b/glx/single2.c
@@ -346,9 +346,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
cl->GLClientextensions);
buf = __glXcombine_strings(buf1,
cx->pGlxScreen->GLextensions);
- if (buf1 != NULL) {
- free(buf1);
- }
+ free(buf1);
string = buf;
}
else if ( name == GL_VERSION ) {
@@ -377,8 +375,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
__GLX_SEND_HEADER();
WriteToClient(client, length, (char *) string);
- if (buf != NULL)
- free(buf);
+ free(buf);
return Success;
}