summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
Diffstat (limited to 'glx')
-rw-r--r--glx/glxcmds.c3
-rw-r--r--glx/glxext.c12
-rw-r--r--glx/single2.c6
-rw-r--r--glx/xfont.c4
4 files changed, 10 insertions, 15 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 25346f923..1d3be4921 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -2431,8 +2431,7 @@ int __glXDisp_ClientInfo(__GLXclientState *cl, GLbyte *pc)
cl->GLClientmajorVersion = req->major;
cl->GLClientminorVersion = req->minor;
- if (cl->GLClientextensions)
- free(cl->GLClientextensions);
+ free(cl->GLClientextensions);
buf = (const char *)(req+1);
cl->GLClientextensions = xstrdup(buf);
diff --git a/glx/glxext.c b/glx/glxext.c
index 4d02b4778..e203156e4 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) free(cx->feedbackBuf);
- if (cx->selectBuf) free(cx->selectBuf);
+ free(cx->feedbackBuf);
+ free(cx->selectBuf);
if (cx == __glXLastContext) {
__glXFlushContextCache();
}
@@ -323,10 +323,10 @@ glxClientCallback (CallbackListPtr *list,
}
}
- if (cl->returnBuf) free(cl->returnBuf);
- if (cl->largeCmdBuf) free(cl->largeCmdBuf);
- if (cl->currentContexts) free(cl->currentContexts);
- if (cl->GLClientextensions) free(cl->GLClientextensions);
+ free(cl->returnBuf);
+ free(cl->largeCmdBuf);
+ free(cl->currentContexts);
+ free(cl->GLClientextensions);
break;
default:
diff --git a/glx/single2.c b/glx/single2.c
index 070062691..56ad86dc6 100644
--- a/glx/single2.c
+++ b/glx/single2.c
@@ -272,10 +272,8 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string)
s2 = sext_string;
}
if (!combo_string || !s1) {
- if (combo_string)
- free(combo_string);
- if (s1)
- free(s1);
+ free(combo_string);
+ free(s1);
return NULL;
}
combo_string[0] = '\0';
diff --git a/glx/xfont.c b/glx/xfont.c
index f0b5644b9..b4081cfd4 100644
--- a/glx/xfont.c
+++ b/glx/xfont.c
@@ -97,9 +97,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci)
pci->metrics.characterWidth, 0,
allocbuf ? allocbuf : buf) );
- if (allocbuf) {
- free(allocbuf);
- }
+ free(allocbuf);
return Success;
#undef __GL_CHAR_BUF_SIZE
}