diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-02-09 17:47:16 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-02-09 17:47:16 +0100 |
commit | dd2e1a69060b9eabde255051e088bbd6bc6e02de (patch) | |
tree | 3f7aa51739c9210ca73019bf6a5320dbad65428b /template.c | |
parent | b5e44445f9b0ac229b7802a46df33d0f2c4a2cd8 (diff) | |
download | rsyslog-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 == ':') { |