summaryrefslogtreecommitdiff
path: root/src/mga_dri.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2011-09-26 22:35:48 -0400
committerMatt Turner <mattst88@gmail.com>2011-09-27 22:48:21 -0400
commit1036e32e006d496023553ea566cb13ae93933719 (patch)
tree8d20c71fed14ed2883fc883065272eb68ae2ee3c /src/mga_dri.c
parentee09a9a340f8946f2d4a71a431b64189dbb5c256 (diff)
Remove if(E != NULL) checks around free(E)
Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mga_dri.c')
-rw-r--r--src/mga_dri.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/mga_dri.c b/src/mga_dri.c
index 957c6df..1454994 100644
--- a/src/mga_dri.c
+++ b/src/mga_dri.c
@@ -1011,8 +1011,8 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg,
pboxNew2 = (BoxPtr)malloc(sizeof(BoxRec)*nbox);
pptNew2 = (DDXPointPtr)malloc(sizeof(DDXPointRec)*nbox);
if (!pboxNew2 || !pptNew2) {
- if (pptNew2) free(pptNew2);
- if (pboxNew2) free(pboxNew2);
+ free(pptNew2);
+ free(pboxNew2);
if (pboxNew1) {
free(pptNew1);
free(pboxNew1);
@@ -1494,21 +1494,13 @@ void MGADRICloseScreen( ScreenPtr pScreen )
DRICloseScreen( pScreen );
if ( pMga->pDRIInfo ) {
- if ( pMga->pDRIInfo->devPrivate ) {
- free( pMga->pDRIInfo->devPrivate );
- pMga->pDRIInfo->devPrivate = 0;
- }
+ free(pMga->pDRIInfo->devPrivate);
+ pMga->pDRIInfo->devPrivate = 0;
DRIDestroyInfoRec( pMga->pDRIInfo );
pMga->pDRIInfo = 0;
}
- if ( pMga->DRIServerInfo ) {
- free(pMga->DRIServerInfo);
- pMga->DRIServerInfo = 0;
- }
- if ( pMga->pVisualConfigs ) {
- free(pMga->pVisualConfigs);
- }
- if ( pMga->pVisualConfigsPriv ) {
- free( pMga->pVisualConfigsPriv );
- }
+ free(pMga->DRIServerInfo);
+ pMga->DRIServerInfo = 0;
+ free(pMga->pVisualConfigs);
+ free(pMga->pVisualConfigsPriv);
}