db cleanup
cleanup to allow database re-load
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -186,8 +186,7 @@ print << 'END';
|
||||
}
|
||||
|
||||
if (executed) {
|
||||
printf("Registration already done.\n");
|
||||
return 0;
|
||||
printf("Warning: Registration already done.\n");
|
||||
}
|
||||
executed = 1;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifndef DBMF_H
|
||||
#define DBMF_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "shareLib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -81,6 +81,7 @@ epicsShareFunc void epicsShareAPI registryFree(void)
|
||||
{
|
||||
if(!gphPvt) return;
|
||||
gphFreeMem(gphPvt);
|
||||
gphPvt = 0;
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI registryDump(void)
|
||||
|
||||
Reference in New Issue
Block a user