summaryrefslogtreecommitdiffstats
path: root/grammar/rainerscript.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-23 17:29:04 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-23 17:29:04 +0200
commit5cddb0533b53f8acfa36a65a4337ff368aa980de (patch)
tree3843f5d24c817c5ff7f0c60f05025abce80e864a /grammar/rainerscript.c
parent9cd8a73cb633a1e4e8b4babd0708d5640aa91445 (diff)
downloadrsyslog-5cddb0533b53f8acfa36a65a4337ff368aa980de.tar.gz
rsyslog-5cddb0533b53f8acfa36a65a4337ff368aa980de.tar.bz2
rsyslog-5cddb0533b53f8acfa36a65a4337ff368aa980de.zip
fix VAR handling in script grammar and code
The $-var designator is now correctly stripped off the varname.
Diffstat (limited to 'grammar/rainerscript.c')
-rw-r--r--grammar/rainerscript.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 774e033f..1b9cda96 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -2554,8 +2554,7 @@ cnfvarNew(char *name)
struct cnfvar *var;
if((var = malloc(sizeof(struct cnfvar))) != NULL) {
var->nodetype = 'V';
- var->name = strdup(name+1);
- free(name);
+ var->name = name;
msgPropDescrFill(&var->prop, (uchar*)var->name, strlen(var->name));
}
return var;