fixed some small bugs M.Z.

This commit is contained in:
cvs
2004-07-06 13:10:03 +00:00
parent adaef594fe
commit 29e34ef0ca
4 changed files with 5 additions and 5 deletions

View File

@ -460,6 +460,7 @@ extern pServer pServ;
{ {
DeleteCommandStack(pVictim->pStack); DeleteCommandStack(pVictim->pStack);
} }
pVictim->lMagic=0; /* make a write to a freed conn. harmless */
/* finally free pVictim*/ /* finally free pVictim*/
free(pVictim); free(pVictim);
} }

View File

@ -484,12 +484,11 @@
int iRet; int iRet;
assert(self); assert(self);
self->iRun = 0;
/* do nothing if not running */ /* do nothing if not running */
if(self->lTask < 0) if(self->lTask < 0)
{ {
printf("Nothing to wait for.... \n"); printf("Nothing to wait for.... \n");
self->iRun = 0; /* not sure if this is needed here, but does not harm */
return self->iStatus; return self->iStatus;
} }

View File

@ -736,7 +736,6 @@ static void ErrReport(pEVControl self)
ObParInit(pRes->pParam, SETTLE, "settle", 0., usUser); ObParInit(pRes->pParam, SETTLE, "settle", 0., usUser);
/* local initialisations */ /* local initialisations */
pRes->pDriv = pDriv;
if (pDriv->GetValues==NULL) /* if GetValues is undefined, set to default */ if (pDriv->GetValues==NULL) /* if GetValues is undefined, set to default */
{ {
pDriv->GetValues=StdGetValues; pDriv->GetValues=StdGetValues;
@ -765,7 +764,7 @@ static void ErrReport(pEVControl self)
DeleteEVController(pRes); DeleteEVController(pRes);
return NULL; return NULL;
} }
pRes->pDriv = pDriv; /* moved here to avoid double freeing on evfactory del */
return pRes; return pRes;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

1
velo.c
View File

@ -854,6 +854,7 @@
pNew->pMonitor = CreateEVController(pMonDriv,pBueffel,&iRet); pNew->pMonitor = CreateEVController(pMonDriv,pBueffel,&iRet);
if(!pNew->pMonitor) if(!pNew->pMonitor)
{ {
DeleteEVDriver(pMonDriv); /* was missing M.Z. Jul 04 */
SCWrite(pCon,"ERROR: failed to create monitor for nvs",eError); SCWrite(pCon,"ERROR: failed to create monitor for nvs",eError);
return 0; return 0;
} }