db cleanup

cleanup to allow database re-load
This commit is contained in:
Michael Davidsaver
2012-06-28 10:55:44 -04:00
parent 4eb31d7edc
commit 026307c06d
6 changed files with 8 additions and 3 deletions

View File

@@ -838,7 +838,7 @@ void dbRegisterFilter(const char *name, const chFilterIf *fif, void *puser)
if (pgph)
return;
pfilt = dbCalloc(1, sizeof(chFilterPlugin));
pfilt = dbCalloc(1, sizeof(chFilterPlugin)); /* leaked */
pfilt->name = epicsStrDup(name);
pfilt->fif = fif;
pfilt->puser = puser;

View File

@@ -14,6 +14,7 @@
#include "epicsUnitTest.h"
#include "epicsExit.h"
#include "dbmf.h"
int callbackTest(void);
@@ -23,5 +24,7 @@ void epicsRunDbTests(void)
runTest(callbackTest);
dbmfFreeChunks();
epicsExit(0); /* Trigger test harness */
}

View File

@@ -651,6 +651,7 @@ void epicsShareAPI dbFreeBase(dbBase *pdbbase)
ellDelete(&pdbRecordType->attributeList,&pAttribute->node);
free((void *)pAttribute->name);
free((void *)pAttribute->pdbFldDes);
free(pAttribute);
pAttribute = pAttributeNext;
}
pdbRecordTypeNext = (dbRecordType *)ellNext(&pdbRecordType->node);

View File

@@ -186,8 +186,7 @@ print << 'END';
}
if (executed) {
printf("Registration already done.\n");
return 0;
printf("Warning: Registration already done.\n");
}
executed = 1;

View File

@@ -16,6 +16,7 @@
#ifndef DBMF_H
#define DBMF_H
#include <stdlib.h>
#include "shareLib.h"
#ifdef __cplusplus

View File

@@ -81,6 +81,7 @@ epicsShareFunc void epicsShareAPI registryFree(void)
{
if(!gphPvt) return;
gphFreeMem(gphPvt);
gphPvt = 0;
}
epicsShareFunc int epicsShareAPI registryDump(void)