Commit 3a26fe8f authored by Jeremy Huddleston Sequoia's avatar Jeremy Huddleston Sequoia
Browse files

Use malloc/calloc/realloc/free directly


Signed-off-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston <jeremyhu@apple.com>
parent e79867c6
...@@ -296,7 +296,7 @@ CYRIXFreeRec(ScrnInfoPtr pScrn) ...@@ -296,7 +296,7 @@ CYRIXFreeRec(ScrnInfoPtr pScrn)
{ {
if (pScrn->driverPrivate == NULL) if (pScrn->driverPrivate == NULL)
return; return;
xfree(pScrn->driverPrivate); free(pScrn->driverPrivate);
pScrn->driverPrivate = NULL; pScrn->driverPrivate = NULL;
} }
...@@ -432,7 +432,7 @@ CYRIXProbe(DriverPtr drv, int flags) ...@@ -432,7 +432,7 @@ CYRIXProbe(DriverPtr drv, int flags)
foundScreen = TRUE; foundScreen = TRUE;
} }
} }
xfree(usedChips); free(usedChips);
} }
} }
...@@ -445,7 +445,7 @@ CYRIXProbe(DriverPtr drv, int flags) ...@@ -445,7 +445,7 @@ CYRIXProbe(DriverPtr drv, int flags)
foundScreen = TRUE; foundScreen = TRUE;
/* Free it since we don't need that list after this */ /* Free it since we don't need that list after this */
xfree(devSections); free(devSections);
if (!(flags & PROBE_DETECT)) { if (!(flags & PROBE_DETECT)) {
for (i=0; i < numUsed; i++) { for (i=0; i < numUsed; i++) {
...@@ -471,7 +471,7 @@ CYRIXProbe(DriverPtr drv, int flags) ...@@ -471,7 +471,7 @@ CYRIXProbe(DriverPtr drv, int flags)
} }
} }
} }
xfree(usedChips); free(usedChips);
return (foundScreen); return (foundScreen);
} }
...@@ -745,7 +745,7 @@ CYRIXPreInit(ScrnInfoPtr pScrn, int flags) ...@@ -745,7 +745,7 @@ CYRIXPreInit(ScrnInfoPtr pScrn, int flags)
xf86CollectOptions(pScrn, NULL); xf86CollectOptions(pScrn, NULL);
/* Process the options */ /* Process the options */
if (!(pCyrix->Options = xalloc(sizeof(CYRIXOptions)))) if (!(pCyrix->Options = malloc(sizeof(CYRIXOptions))))
return FALSE; return FALSE;
memcpy(pCyrix->Options, CYRIXOptions, sizeof(CYRIXOptions)); memcpy(pCyrix->Options, CYRIXOptions, sizeof(CYRIXOptions));
xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pCyrix->Options); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pCyrix->Options);
...@@ -1237,7 +1237,7 @@ CYRIXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) ...@@ -1237,7 +1237,7 @@ CYRIXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if(pCyrix->ShadowFB) { if(pCyrix->ShadowFB) {
pCyrix->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width); pCyrix->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
pCyrix->ShadowPtr = xalloc(pCyrix->ShadowPitch * height); pCyrix->ShadowPtr = malloc(pCyrix->ShadowPitch * height);
displayWidth = pCyrix->ShadowPitch / (pScrn->bitsPerPixel >> 3); displayWidth = pCyrix->ShadowPitch / (pScrn->bitsPerPixel >> 3);
FBStart = pCyrix->ShadowPtr; FBStart = pCyrix->ShadowPtr;
} else { } else {
...@@ -1314,7 +1314,7 @@ CYRIXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) ...@@ -1314,7 +1314,7 @@ CYRIXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
(miBankProcPtr)CYRIXSetReadWrite; (miBankProcPtr)CYRIXSetReadWrite;
if (!miInitializeBanking(pScreen, pScrn->virtualX, pScrn->virtualY, if (!miInitializeBanking(pScreen, pScrn->virtualX, pScrn->virtualY,
pScrn->displayWidth, pBankInfo)) { pScrn->displayWidth, pBankInfo)) {
xfree(pBankInfo); free(pBankInfo);
pBankInfo = NULL; pBankInfo = NULL;
return FALSE; return FALSE;
} }
...@@ -1492,7 +1492,7 @@ CYRIXCloseScreen(int scrnIndex, ScreenPtr pScreen) ...@@ -1492,7 +1492,7 @@ CYRIXCloseScreen(int scrnIndex, ScreenPtr pScreen)
if(pCyrix->AccelInfoRec) if(pCyrix->AccelInfoRec)
XAADestroyInfoRec(pCyrix->AccelInfoRec); XAADestroyInfoRec(pCyrix->AccelInfoRec);
if (pCyrix->ShadowPtr) if (pCyrix->ShadowPtr)
xfree(pCyrix->ShadowPtr); free(pCyrix->ShadowPtr);
pScrn->vtSema = FALSE; pScrn->vtSema = FALSE;
pScreen->CloseScreen = pCyrix->CloseScreen; pScreen->CloseScreen = pCyrix->CloseScreen;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment