diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | module-template.h | 2 | ||||
-rw-r--r-- | omfile.c | 5 | ||||
-rw-r--r-- | syslogd.c | 1 |
4 files changed, 7 insertions, 3 deletions
@@ -6,6 +6,8 @@ Version 2.0.3 STABLE (rgerhards), 2008-02-?? unlikely to happen in practice), for details see tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=38 - improved the man pages a bit - thanks to Michael Biebl for the patch +- bugfix: not properly initialized data could cause several segfaults if + there were errors in the config file - thanks to varmojfekoj for the patch --------------------------------------------------------------------------- Version 2.0.2 STABLE (rgerhards), 2008-02-12 - fixed a bug that could cause invalid string handling via strerror_r diff --git a/module-template.h b/module-template.h index 13ae4b86..a5ece4fb 100644 --- a/module-template.h +++ b/module-template.h @@ -260,7 +260,7 @@ finalize_it:\ *ppOMSR = NULL;\ }\ if(pData != NULL)\ - freeInstance(&pData);\ + freeInstance(pData);\ } #define ENDparseSelectorAct \ @@ -344,7 +344,8 @@ static void dynaFileFreeCache(instanceData *pData) dynaFileDelCacheEntry(pData->dynCache, i, 1); } - free(pData->dynCache); + if(pData->dynCache != NULL) + free(pData->dynCache); } @@ -605,7 +606,7 @@ BEGINfreeInstance CODESTARTfreeInstance if(pData->bDynamicName) { dynaFileFreeCache(pData); - } else + } else if(pData->fd != -1) close(pData->fd); ENDfreeInstance @@ -5220,6 +5220,7 @@ static rsRetVal cflineDoAction(uchar **p, action_t **ppAction) /* loop through all modules and see if one picks up the line */ pMod = omodGetNxt(NULL); while(pMod != NULL) { + pOMSR = NULL; iRet = pMod->mod.om.parseSelectorAct(p, &pModData, &pOMSR); dbgprintf("tried selector action for %s: %d\n", modGetName(pMod), iRet); if(iRet == RS_RET_OK || iRet == RS_RET_SUSPENDED) { |