diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-20 12:18:20 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-20 12:18:20 +0200 |
commit | bf8125f4e96a011ec28cc58b225bb815f72fc53c (patch) | |
tree | 2431ecfe08b01c7ef1756cc8e2b5be9fd4a65c60 /template.c | |
parent | 4ec7b9d9ec12d91dde3d030bdaf87cfdd6b5d81d (diff) | |
download | rsyslog-bf8125f4e96a011ec28cc58b225bb815f72fc53c.tar.gz rsyslog-bf8125f4e96a011ec28cc58b225bb815f72fc53c.tar.xz rsyslog-bf8125f4e96a011ec28cc58b225bb815f72fc53c.zip |
bugfix: minor static memory leak while reading configuration
This did NOT leak based on message volume. Also, did some cleanup during
the commit.
Diffstat (limited to 'template.c')
-rw-r--r-- | template.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -566,8 +566,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); /* Check frompos, if it has an R, then topos should be a regex */ if(*p == ':') { |