summaryrefslogtreecommitdiff
path: root/omfile.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2008-03-29 12:15:13 +0100
committerMichael Biebl <biebl@debian.org>2008-03-29 12:15:13 +0100
commit9b68e0f3a37ec87dff0f24665a89cd36c8adcb72 (patch)
tree248494aafae9aa9cd54b0fd628fde0558dfb5f20 /omfile.c
parent4f9e746bd83a363f2f66a1f31ed9fd92f614754e (diff)
downloadrsyslog-9b68e0f3a37ec87dff0f24665a89cd36c8adcb72.tar.gz
Imported Upstream version 2.0.3upstream/2.0.3
Diffstat (limited to 'omfile.c')
-rw-r--r--omfile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/omfile.c b/omfile.c
index cd5e23c..db2ec3e 100644
--- a/omfile.c
+++ b/omfile.c
@@ -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