diff options
author | Matt Turner <mattst88@gmail.com> | 2010-06-09 01:23:36 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2010-06-09 01:23:36 -0400 |
commit | c8a03b63945a358bd895590a8ed2b817b9f08ce9 (patch) | |
tree | 48e53d2818ff5a52a4fc69afdb41d5d85c2e5369 | |
parent | 610703a0453e30354aae959a914200ca33012b4a (diff) |
Remove superfluous if(p) checks around free(p)
Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r-- | src/glint_dri.c | 8 | ||||
-rw-r--r-- | src/glint_driver.c | 9 | ||||
-rw-r--r-- | src/pm3_video.c | 3 |
3 files changed, 7 insertions, 13 deletions
diff --git a/src/glint_dri.c b/src/glint_dri.c index e2ea264..4e4e71d 100644 --- a/src/glint_dri.c +++ b/src/glint_dri.c @@ -817,14 +817,12 @@ GLINTDRICloseScreen(ScreenPtr pScreen) DRICloseScreen(pScreen); if (pGlint->pDRIInfo) { - if (pGlint->pDRIInfo->devPrivate) { - free(pGlint->pDRIInfo->devPrivate); - } + free(pGlint->pDRIInfo->devPrivate); DRIDestroyInfoRec(pGlint->pDRIInfo); } - if (pGlint->pVisualConfigs) free(pGlint->pVisualConfigs); - if (pGlint->pVisualConfigsPriv) free(pGlint->pVisualConfigsPriv); + free(pGlint->pVisualConfigs); + free(pGlint->pVisualConfigsPriv); } Bool diff --git a/src/glint_driver.c b/src/glint_driver.c index 4bd922a..ffafc39 100644 --- a/src/glint_driver.c +++ b/src/glint_driver.c @@ -3375,12 +3375,9 @@ GLINTCloseScreen(int scrnIndex, ScreenPtr pScreen) XAADestroyInfoRec(pGlint->AccelInfoRec); if(pGlint->CursorInfoRec) xf86DestroyCursorInfoRec(pGlint->CursorInfoRec); - if (pGlint->ShadowPtr) - free(pGlint->ShadowPtr); - if (pGlint->DGAModes) - free(pGlint->DGAModes); - if (pGlint->ScratchBuffer) - free(pGlint->ScratchBuffer); + free(pGlint->ShadowPtr); + free(pGlint->DGAModes); + free(pGlint->ScratchBuffer); pScrn->vtSema = FALSE; if (xf86IsPc98()) diff --git a/src/pm3_video.c b/src/pm3_video.c index 59a9ea2..6b4ad59 100644 --- a/src/pm3_video.c +++ b/src/pm3_video.c @@ -112,8 +112,7 @@ void Permedia3InitVideo(ScreenPtr pScreen) if(num_adaptors) xf86XVScreenInit(pScreen, adaptors, num_adaptors); - if(newAdaptors) - free(newAdaptors); + free(newAdaptors); } /* client libraries expect an encoding */ |