Module Name: src
Committed By: christos
Date: Fri Sep 1 07:01:06 UTC 2017
Modified Files:
src/external/historical/nawk/dist: lex.c
Log Message:
PR/52516: Guy Incognito: Fix memory leak; setsymtab already calls tostring()
for the buffer, don't do it twice.
XXX: pullup-8
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/historical/nawk/dist/lex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/historical/nawk/dist/lex.c
diff -u src/external/historical/nawk/dist/lex.c:1.2 src/external/historical/nawk/dist/lex.c:1.3
--- src/external/historical/nawk/dist/lex.c:1.2 Thu Aug 26 10:55:19 2010
+++ src/external/historical/nawk/dist/lex.c Fri Sep 1 03:01:06 2017
@@ -201,7 +201,7 @@ int yylex(void)
if (isalpha(c) || c == '_')
return word(buf);
if (isdigit(c)) {
- yylval.cp = setsymtab(buf, tostring(buf), atof(buf), CON|NUM, symtab);
+ yylval.cp = setsymtab(buf, buf, atof(buf), CON|NUM, symtab);
/* should this also have STR set? */
RET(NUMBER);
}