summaryrefslogtreecommitdiffstats
path: root/template.c
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2012-09-03 18:46:08 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-09-04 10:17:47 +0200
commitd8f00298183f7a65f9a5ab9f10b851e2c2c6746c (patch)
tree349ef6bdd65c36eac47829c23df681faabe8f26e /template.c
parent080825632bd32e6baae1afde00df307fd4237ee4 (diff)
downloadrsyslog-d8f00298183f7a65f9a5ab9f10b851e2c2c6746c.tar.gz
rsyslog-d8f00298183f7a65f9a5ab9f10b851e2c2c6746c.tar.bz2
rsyslog-d8f00298183f7a65f9a5ab9f10b851e2c2c6746c.zip
Fix a memory leak in "outname"
In all cases, the variable already contains a newly allocated copy. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'template.c')
-rw-r--r--template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/template.c b/template.c
index 5d933619..074e12b5 100644
--- a/template.c
+++ b/template.c
@@ -1540,7 +1540,7 @@ createPropertyTpe(struct template *pTpl, struct cnfobj *o)
pTpe->data.field.options.bSecPathReplace = 1;
break;
}
- pTpe->fieldName = ustrdup(outname);
+ pTpe->fieldName = outname;
if(outname != NULL)
pTpe->lenFieldName = ustrlen(outname);
pTpe->data.field.eDateFormat = datefmt;