diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-06 15:28:30 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-06-06 20:27:18 +0700 |
commit | 0a4d8cbdcd7b25313fb29ccdb498044af95f7de6 (patch) | |
tree | 3534c9035180b7e0d2ebbbf0202a370cb61f8e8d /hw/xfree86/dri | |
parent | 5a0fc0ad21d562612676ef88ef2d533b2391810a (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: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'hw/xfree86/dri')
-rw-r--r-- | hw/xfree86/dri/dri.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index db4cd7b00..61bbe9aa0 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -578,10 +578,8 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) drmInstallSIGIOHandler(pDRIPriv->drmFD, DRISwapContext))) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to setup DRM signal handler\n"); - if (pDRIPriv->hiddenContextStore) - free(pDRIPriv->hiddenContextStore); - if (pDRIPriv->partial3DContextStore) - free(pDRIPriv->partial3DContextStore); + free(pDRIPriv->hiddenContextStore); + free(pDRIPriv->partial3DContextStore); DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } else { @@ -1618,7 +1616,7 @@ DRICreateInfoRec(void) void DRIDestroyInfoRec(DRIInfoPtr DRIInfo) { - if (DRIInfo->busIdString) free(DRIInfo->busIdString); + free(DRIInfo->busIdString); free((char*)DRIInfo); } |