diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-12 08:07:30 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-12 08:07:30 +0000 |
commit | 230883321cfa7e2dea6d4e5bffe5c3a6b00883ba (patch) | |
tree | 6552d04cd3a221a9d2e731fb7a0b0a3c146ffa31 /omfile.c | |
parent | b00cf838bb11fdff8a55c67f07e1045350ec8981 (diff) | |
download | rsyslog-230883321cfa7e2dea6d4e5bffe5c3a6b00883ba.tar.gz rsyslog-230883321cfa7e2dea6d4e5bffe5c3a6b00883ba.tar.xz rsyslog-230883321cfa7e2dea6d4e5bffe5c3a6b00883ba.zip |
- bugfix: not properly initialized data could cause several segfaults if
there were errors in the config file - thanks to varmojfekoj for the
patch
Diffstat (limited to 'omfile.c')
-rw-r--r-- | omfile.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |