summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2012-09-03 19:23:06 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-09-04 10:19:48 +0200
commit64599e94126341f3d19703ea85f6403cbf80a5fb (patch)
tree5f06c785d3a345b189fba2a7186b2f07d5f06b8e
parent396743e19aed8494c68c3a41ce140e884d4a71af (diff)
downloadrsyslog-64599e94126341f3d19703ea85f6403cbf80a5fb.tar.gz
rsyslog-64599e94126341f3d19703ea85f6403cbf80a5fb.tar.bz2
rsyslog-64599e94126341f3d19703ea85f6403cbf80a5fb.zip
Don't leak property name
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-rw-r--r--template.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/template.c b/template.c
index 074e12b5..f5260191 100644
--- a/template.c
+++ b/template.c
@@ -1297,7 +1297,7 @@ static rsRetVal
createPropertyTpe(struct template *pTpl, struct cnfobj *o)
{
struct templateEntry *pTpe;
- cstr_t *name;
+ cstr_t *name = NULL;
uchar *outname = NULL;
int i;
int droplastlf = 0;
@@ -1582,6 +1582,8 @@ createPropertyTpe(struct template *pTpl, struct cnfobj *o)
}
finalize_it:
+ if(name != NULL)
+ rsCStrDestruct(&name);
RETiRet;
}