summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-04 17:07:44 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-04 17:07:44 +0000
commitc34ef852ee583de6e335f02d78f917b7d4da8062 (patch)
tree8b8e11642b4e51f5098b5166b3e13955a5e6c8e9 /syslogd.c
parentbd5433196fb49972977b981baa25194e609e160d (diff)
downloadrsyslog-c34ef852ee583de6e335f02d78f917b7d4da8062.zip
rsyslog-c34ef852ee583de6e335f02d78f917b7d4da8062.tar.gz
rsyslog-c34ef852ee583de6e335f02d78f917b7d4da8062.tar.xz
bugfix: segfault with expression-based filters - so far untested
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/syslogd.c b/syslogd.c
index 1c6766d..9d4c778 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -1053,10 +1053,11 @@ static rsRetVal shouldProcessThisMessage(selector_t *f, msg_t *pMsg, int *bProce
finalize_it:
/* destruct in any case, not just on error, but it makes error handling much easier */
- if(pVM != NULL) {
- var.Destruct(&pResult);
+ if(pVM != NULL)
vm.Destruct(&pVM);
- }
+
+ if(pResult != NULL)
+ var.Destruct(&pResult);
*bProcessMsg = bRet;
RETiRet;