From b20cfa3d4f531b612a28ea88e5f5a6b1df183ea0 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 27 Feb 2011 15:49:12 +0100 Subject: Replace calls to xalloc/xcalloc/xfree with malloc/calloc/free Also don't check for NULL before calling free(). Signed-off-by: Julien Cristau --- src/smi_driver.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/smi_driver.c') diff --git a/src/smi_driver.c b/src/smi_driver.c index 093c87d..9c10e46 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -281,9 +281,9 @@ SMI_FreeRec(ScrnInfoPtr pScrn) ENTER(); if (pSmi) { - xfree(pSmi->save); - xfree(pSmi->mode); - xfree(pScrn->driverPrivate); + free(pSmi->save); + free(pSmi->mode); + free(pScrn->driverPrivate); pScrn->driverPrivate = NULL; } @@ -338,7 +338,7 @@ SMI_Probe(DriverPtr drv, int flags) numDevSections, drv, &usedChips); /* Free it since we don't need that list after this */ - xfree(devSections); + free(devSections); if (numUsed <= 0) LEAVE(FALSE); @@ -364,14 +364,14 @@ SMI_Probe(DriverPtr drv, int flags) if ((pEnt = xf86GetEntityInfo(usedChips[i]))) { pScrn->EnterVT = SMI_EnterVT; pScrn->LeaveVT = SMI_LeaveVT; - xfree(pEnt); + free(pEnt); } pScrn->FreeScreen = SMI_FreeScreen; foundScreen = TRUE; } } } - xfree(usedChips); + free(usedChips); LEAVE(foundScreen); } @@ -421,7 +421,7 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) } if (pEnt->location.type != BUS_PCI) { - xfree(pEnt); + free(pEnt); SMI_FreeRec(pScrn); LEAVE(FALSE); } @@ -519,7 +519,7 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) } /* Process the options */ - if (!(pSmi->Options = xalloc(sizeof(SMIOptions)))) + if (!(pSmi->Options = malloc(sizeof(SMIOptions)))) LEAVE(FALSE); memcpy(pSmi->Options, SMIOptions, sizeof(SMIOptions)); @@ -662,7 +662,7 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) } else pSmi->ChipRev = PCI_DEV_REVISION(pSmi->PciInfo); - xfree(pEnt); + free(pEnt); /* * This shouldn't happen because such problems should be caught in @@ -1858,7 +1858,7 @@ SMI_CloseScreen(int scrnIndex, ScreenPtr pScreen) pSmi->pInt10 = NULL; } if (pSmi->ptrAdaptor != NULL) { - xfree(pSmi->ptrAdaptor); + free(pSmi->ptrAdaptor); } if (pSmi->BlockHandler != NULL) { pScreen->BlockHandler = pSmi->BlockHandler; -- cgit v1.2.3