diff options
author | Cyril Brulebois <kibi@debian.org> | 2010-11-08 23:35:32 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-11-11 08:28:50 +1000 |
commit | 0649ac0afdb3f8ed11c2634563d6b9df161cb9ec (patch) | |
tree | 89e9d878709b2660ac15f4679d9bbce0a64842ed /hw/dmx/glxProxy | |
parent | 99275ad2fa99778afaefc54b62c8638afc59e755 (diff) |
Remove more superfluous if(p) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch:
@@
expression E;
@@
- if (E)
- free(E);
+ free(E);
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/dmx/glxProxy')
-rw-r--r-- | hw/dmx/glxProxy/glxcmds.c | 2 | ||||
-rw-r--r-- | hw/dmx/glxProxy/glxext.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c index a9744e186..760212865 100644 --- a/hw/dmx/glxProxy/glxcmds.c +++ b/hw/dmx/glxProxy/glxcmds.c @@ -2565,7 +2565,7 @@ int __glXClientInfo(__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 = strdup(buf); diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c index a8fc0a88d..886b317c6 100644 --- a/hw/dmx/glxProxy/glxext.c +++ b/hw/dmx/glxProxy/glxext.c @@ -77,10 +77,10 @@ static void ResetClientState(int clientIndex) Display **keep_be_displays; int i; - if (cl->returnBuf) free(cl->returnBuf); - if (cl->currentContexts) free(cl->currentContexts); - if (cl->currentDrawables) free(cl->currentDrawables); - if (cl->largeCmdBuf) free(cl->largeCmdBuf); + free(cl->returnBuf); + free(cl->currentContexts); + free(cl->currentDrawables); + free(cl->largeCmdBuf); for (i=0; i< screenInfo.numScreens; i++) { if (cl->be_displays[i]) @@ -97,7 +97,7 @@ static void ResetClientState(int clientIndex) */ cl->GLClientmajorVersion = 1; cl->GLClientminorVersion = 0; - if (cl->GLClientextensions) free(cl->GLClientextensions); + free(cl->GLClientextensions); memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *)); } @@ -222,10 +222,10 @@ GLboolean __glXFreeContext(__GLXcontext *cx) { if (cx->idExists || cx->isCurrent) return GL_FALSE; - if (cx->feedbackBuf) free(cx->feedbackBuf); - if (cx->selectBuf) free(cx->selectBuf); - if (cx->real_ids) free(cx->real_ids); - if (cx->real_vids) free(cx->real_vids); + free(cx->feedbackBuf); + free(cx->selectBuf); + free(cx->real_ids); + free(cx->real_vids); if (cx->pGlxPixmap) { /* |