Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/historical/nawk/dist PR/52516: Guy Incognito: Fix m...



details:   https://anonhg.NetBSD.org/src/rev/b7e4bac92f30
branches:  trunk
changeset: 826395:b7e4bac92f30
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Sep 01 07:01:06 2017 +0000

description:
PR/52516: Guy Incognito: Fix memory leak; setsymtab already calls tostring()
for the buffer, don't do it twice.
XXX: pullup-8

diffstat:

 external/historical/nawk/dist/lex.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 277883c6fec0 -r b7e4bac92f30 external/historical/nawk/dist/lex.c
--- a/external/historical/nawk/dist/lex.c       Fri Sep 01 05:53:09 2017 +0000
+++ b/external/historical/nawk/dist/lex.c       Fri Sep 01 07:01:06 2017 +0000
@@ -201,7 +201,7 @@
                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);
                }



Home | Main Index | Thread Index | Old Index