Mercurial > octave
diff libinterp/parse-tree/oct-parse.in.yy @ 24045:a666e433aa21
avoid memory leak when parsing function and classdef files
* oct-parse.in.yy (file): Delete current scope before popping
unused symbol table context.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 15 Sep 2017 14:03:33 -0400 |
parents | 840882c82e22 |
children | c81ed514ca2c |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.in.yy Thu Sep 14 21:18:47 2017 -0700 +++ b/libinterp/parse-tree/oct-parse.in.yy Fri Sep 15 14:03:33 2017 -0400 @@ -1464,6 +1464,7 @@ // base_parser::m_primary_fcn_ptr. // Unused symbol table context. + delete lexer.symtab_context.curr_scope (); lexer.symtab_context.pop (); delete $3; @@ -1487,6 +1488,7 @@ YYUSE ($6); // Unused symbol table context. + delete lexer.symtab_context.curr_scope (); lexer.symtab_context.pop (); if (lexer.reading_classdef_file)