From 29e34ef0ca1be8c7f3790e86e1d5304ba272b672 Mon Sep 17 00:00:00 2001 From: cvs Date: Tue, 6 Jul 2004 13:10:03 +0000 Subject: [PATCH] fixed some small bugs M.Z. --- conman.c | 1 + devexec.c | 5 ++--- evcontroller.c | 3 +-- velo.c | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conman.c b/conman.c index eee048f3..9873e748 100644 --- a/conman.c +++ b/conman.c @@ -460,6 +460,7 @@ extern pServer pServ; { DeleteCommandStack(pVictim->pStack); } + pVictim->lMagic=0; /* make a write to a freed conn. harmless */ /* finally free pVictim*/ free(pVictim); } diff --git a/devexec.c b/devexec.c index 4f03796e..fb0ff45c 100644 --- a/devexec.c +++ b/devexec.c @@ -484,12 +484,11 @@ int iRet; assert(self); - self->iRun = 0; - /* do nothing if not running */ 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; } diff --git a/evcontroller.c b/evcontroller.c index fe740129..52bf3a8f 100644 --- a/evcontroller.c +++ b/evcontroller.c @@ -736,7 +736,6 @@ static void ErrReport(pEVControl self) ObParInit(pRes->pParam, SETTLE, "settle", 0., usUser); /* local initialisations */ - pRes->pDriv = pDriv; if (pDriv->GetValues==NULL) /* if GetValues is undefined, set to default */ { pDriv->GetValues=StdGetValues; @@ -765,7 +764,7 @@ static void ErrReport(pEVControl self) DeleteEVController(pRes); return NULL; } - + pRes->pDriv = pDriv; /* moved here to avoid double freeing on evfactory del */ return pRes; } /*---------------------------------------------------------------------------*/ diff --git a/velo.c b/velo.c index 0134f155..b26f69ae 100644 --- a/velo.c +++ b/velo.c @@ -854,6 +854,7 @@ pNew->pMonitor = CreateEVController(pMonDriv,pBueffel,&iRet); if(!pNew->pMonitor) { + DeleteEVDriver(pMonDriv); /* was missing M.Z. Jul 04 */ SCWrite(pCon,"ERROR: failed to create monitor for nvs",eError); return 0; }