summaryrefslogtreecommitdiffstats
path: root/grammar
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-18 10:07:22 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-18 10:07:22 +0200
commita781f8b8b0eee6379880822933b9966ffed5492f (patch)
treecf68150b01ea6c7fa24f6e9e1858d88d64ce0a67 /grammar
parent09f1216c5e4cc3c9f4906a86680b5290808d2166 (diff)
downloadrsyslog-a781f8b8b0eee6379880822933b9966ffed5492f.tar.gz
rsyslog-a781f8b8b0eee6379880822933b9966ffed5492f.tar.bz2
rsyslog-a781f8b8b0eee6379880822933b9966ffed5492f.zip
bugfix: invalid property filter was not properly disabled in ruleset
Note that this bugfix introduces a very slight memory leak, which is cosmetic, as it just holds data until termination that is no longer needed. It is just the part of the config that was invalid. We will "fix" this "issue" in the devel version first, as the fix is a bit too intrusive to do without hard need in the stable version.
Diffstat (limited to 'grammar')
-rw-r--r--grammar/rainerscript.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index f9c5047c..63bb6f67 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -2570,14 +2570,15 @@ struct cnfstmt *
cnfstmtNewPROPFILT(char *propfilt, struct cnfstmt *t_then)
{
struct cnfstmt* cnfstmt;
- rsRetVal lRet;
if((cnfstmt = cnfstmtNew(S_PROPFILT)) != NULL) {
cnfstmt->printable = (uchar*)propfilt;
cnfstmt->d.s_propfilt.t_then = t_then;
cnfstmt->d.s_propfilt.propName = NULL;
cnfstmt->d.s_propfilt.regex_cache = NULL;
cnfstmt->d.s_propfilt.pCSCompValue = NULL;
- lRet = DecodePropFilter((uchar*)propfilt, cnfstmt);
+ if(DecodePropFilter((uchar*)propfilt, cnfstmt) != RS_RET_OK) {
+ cnfstmt->nodetype = S_NOP; /* disable action! */
+ }
}
return cnfstmt;
}