diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-12 07:11:09 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-12 07:11:09 +0000 |
commit | b1555cd681652e57f76449e39cb1aae8db7d601b (patch) | |
tree | 274b22d93e2daedc177ed5a990ed042e4feb04a0 /omfile.c | |
parent | e946e122d02987552874595f2613c07ce0c0aa23 (diff) | |
download | rsyslog-b1555cd681652e57f76449e39cb1aae8db7d601b.tar.gz rsyslog-b1555cd681652e57f76449e39cb1aae8db7d601b.tar.xz rsyslog-b1555cd681652e57f76449e39cb1aae8db7d601b.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
@@ -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 |