From 8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127 Mon Sep 17 00:00:00 2001 From: varmojfekoj Date: Thu, 4 Feb 2010 16:02:57 +0100 Subject: bugfix: several smaller bugs resolved after flexelint review Signed-off-by: Rainer Gerhards --- template.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'template.c') diff --git a/template.c b/template.c index 6e34bcd8..f8615fee 100644 --- a/template.c +++ b/template.c @@ -431,10 +431,7 @@ static int do_Constant(unsigned char **pp, struct template *pTpl) } if((pTpe = tpeConstruct(pTpl)) == NULL) { - /* OK, we are out of luck. Let's invalidate the - * entry and that's it. - */ - pTpe->eEntryType = UNDEFINED; + rsCStrDestruct(&pStrB); return 1; } pTpe->eEntryType = CONSTANT; -- cgit v1.2.3 From dd2e1a69060b9eabde255051e088bbd6bc6e02de Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 9 Feb 2010 17:47:16 +0100 Subject: fixed a small memory leak during config file parsing --- template.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'template.c') diff --git a/template.c b/template.c index 8c13573b..9c4a2a39 100644 --- a/template.c +++ b/template.c @@ -563,8 +563,11 @@ static int do_Parameter(unsigned char **pp, struct template *pTpl) /* got the name */ cstrFinalize(pStrB); - if(propNameToID(pStrB, &pTpe->data.field.propid) != RS_RET_OK) + if(propNameToID(pStrB, &pTpe->data.field.propid) != RS_RET_OK) { + cstrDestruct(&pStrB); return 1; + } + cstrDestruct(&pStrB); /* no longer needed, now use ID */ /* Check frompos, if it has an R, then topos should be a regex */ if(*p == ':') { -- cgit v1.2.3 From d97ad63e218112d7cd3a390854b2918407804976 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 8 Mar 2010 17:56:11 +0100 Subject: added new property replacer option "date-rfc3164-buggyday" primarily to ease migration from syslog-ng. See property replacer doc for details. [backport from 5.5.3 because urgently needed by some] --- template.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'template.c') diff --git a/template.c b/template.c index 9c4a2a39..5a43cba3 100644 --- a/template.c +++ b/template.c @@ -487,6 +487,8 @@ static void doOptions(unsigned char **pp, struct templateEntry *pTpe) pTpe->data.field.eDateFormat = tplFmtPgSQLDate; } else if(!strcmp((char*)Buf, "date-rfc3164")) { pTpe->data.field.eDateFormat = tplFmtRFC3164Date; + } else if(!strcmp((char*)Buf, "date-rfc3164-buggyday")) { + pTpe->data.field.eDateFormat = tplFmtRFC3164BuggyDate; } else if(!strcmp((char*)Buf, "date-rfc3339")) { pTpe->data.field.eDateFormat = tplFmtRFC3339Date; } else if(!strcmp((char*)Buf, "date-subseconds")) { -- cgit v1.2.3