summaryrefslogtreecommitdiffstats
path: root/grammar/lexer.l
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-08 09:13:39 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-08 09:13:39 +0200
commitd9ea755214ab75afa039a4df89f828d4b8b30ef0 (patch)
tree38a342665c206fef93ba230567c9f0f8051feaea /grammar/lexer.l
parent834fe024b4e53f65d9622a176116f232e212e326 (diff)
downloadrsyslog-d9ea755214ab75afa039a4df89f828d4b8b30ef0.tar.gz
rsyslog-d9ea755214ab75afa039a4df89f828d4b8b30ef0.tar.xz
rsyslog-d9ea755214ab75afa039a4df89f828d4b8b30ef0.zip
milestone/[PARTWORK]: implemented comparison operations
Diffstat (limited to 'grammar/lexer.l')
-rw-r--r--grammar/lexer.l3
1 files changed, 3 insertions, 0 deletions
diff --git a/grammar/lexer.l b/grammar/lexer.l
index d761003a..347a2a7a 100644
--- a/grammar/lexer.l
+++ b/grammar/lexer.l
@@ -72,6 +72,7 @@ struct bufstack {
YY_BUFFER_STATE bs;
int lineno;
char *fn;
+ es_str_t *estr;
} *currbs = NULL;
char *currfn; /* name of currently processed file */
@@ -228,6 +229,7 @@ cnfSetLexFile(char *fname)
bs->prev = currbs;
bs->fn = strdup(fname == NULL ? "stdin" : fname);
bs->bs = yy_scan_buffer((char*)es_getBufAddr(str), es_strlen(str));
+ bs->estr = str; /* needed so we can free it later */
currbs = bs;
currfn = bs->fn;
yylineno = 1;
@@ -253,6 +255,7 @@ popfile(void)
/* delte current entry */
yy_delete_buffer(bs->bs);
free(bs->fn);
+ free(bs->estr);
/* switch back to previous */
currbs = bs->prev;