From 26000d7bf153606fcfe6f1665ff7b441348a20f1 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 4 Apr 2008 17:04:54 +0000 Subject: bugfix: segfault with expression-based filters - so far untested --- syslogd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index 355689c0..f21fce7e 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; -- cgit