diff options
author | Julien Cristau <jcristau@debian.org> | 2011-02-27 15:49:12 +0100 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2011-02-27 16:00:54 +0100 |
commit | b20cfa3d4f531b612a28ea88e5f5a6b1df183ea0 (patch) | |
tree | 8efe0b57a8c97f777599e649610af9b16237b79d /src/smi_driver.c | |
parent | 312540ac447acaf80db7e341aa75f90f3e821438 (diff) |
Replace calls to xalloc/xcalloc/xfree with malloc/calloc/free
Also don't check for NULL before calling free().
Signed-off-by: Julien Cristau <jcristau@debian.org>
Diffstat (limited to 'src/smi_driver.c')
-rw-r--r-- | src/smi_driver.c | 20 |
1 files changed, 10 insertions, 10 deletions
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; |