summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf.c1
-rw-r--r--omfile.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/conf.c b/conf.c
index fd046fb4..49bce213 100644
--- a/conf.c
+++ b/conf.c
@@ -1024,6 +1024,7 @@ static rsRetVal cflineDoAction(uchar **p, action_t **ppAction)
/* loop through all modules and see if one picks up the line */
pMod = module.GetNxtType(NULL, eMOD_OUT);
while(pMod != NULL) {
+ pOMSR = NULL;
iRet = pMod->mod.om.parseSelectorAct(p, &pModData, &pOMSR);
dbgprintf("tried selector action for %s: %d\n", module.GetName(pMod), iRet);
if(iRet == RS_RET_OK || iRet == RS_RET_SUSPENDED) {
diff --git a/omfile.c b/omfile.c
index 99409e56..113dcf80 100644
--- a/omfile.c
+++ b/omfile.c
@@ -356,7 +356,8 @@ static void dynaFileFreeCache(instanceData *pData)
dynaFileDelCacheEntry(pData->dynCache, i, 1);
}
- d_free(pData->dynCache);
+ if(pData->dynCache != NULL)
+ d_free(pData->dynCache);
ENDfunc;
}
@@ -620,7 +621,7 @@ BEGINfreeInstance
CODESTARTfreeInstance
if(pData->bDynamicName) {
dynaFileFreeCache(pData);
- } else
+ } else if(pData->fd != -1)
close(pData->fd);
ENDfreeInstance