Change from using pasynManager->memMalloc to callocMustSucceed; memory must be zeroed

This commit is contained in:
MarkRivers
2006-04-29 19:02:07 +00:00
parent fd67e23c38
commit 04ed7197c3
+1 -5
View File
@@ -257,11 +257,7 @@ int drvAsynMotorConfigure(const char *portName, const char *driverName, int card
pPvt->card = card;
config(pPvt);
pPvt->axisData = pasynManager->memMalloc(num_axes * sizeof(drvmotorAxisPvt));
if (!pPvt->axisData) {
errlogPrintf("drvAsynMotorConfigure ERROR: Cannot allocate memory\n");
return -1;
}
pPvt->axisData = callocMustSucceed(num_axes, sizeof(drvmotorAxisPvt), "drvAsynMotorConfigure");
for ( i = 0; i < num_axes; i++) {
pAxis = &pPvt->axisData[i];
pAxis->axis = (*pPvt->drvset->open)(card, i, "");