summaryrefslogtreecommitdiffstats
path: root/template.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-02-09 17:47:16 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-02-09 17:47:16 +0100
commitdd2e1a69060b9eabde255051e088bbd6bc6e02de (patch)
tree3f7aa51739c9210ca73019bf6a5320dbad65428b /template.c
parentb5e44445f9b0ac229b7802a46df33d0f2c4a2cd8 (diff)
downloadrsyslog-dd2e1a69060b9eabde255051e088bbd6bc6e02de.tar.gz
rsyslog-dd2e1a69060b9eabde255051e088bbd6bc6e02de.tar.xz
rsyslog-dd2e1a69060b9eabde255051e088bbd6bc6e02de.zip
fixed a small memory leak during config file parsing
Diffstat (limited to 'template.c')
-rw-r--r--template.c5
1 files changed, 4 insertions, 1 deletions
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 == ':') {