зеркало из https://github.com/github/ruby.git
parse.y: fix memory leak
* parse.y (parser_free): fix memory leak at syntax error when warn-indent is enabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b881747bbd
Коммит
17ff3b9b85
|
@ -1,3 +1,8 @@
|
|||
Wed Sep 30 01:34:34 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (parser_free): fix memory leak at syntax error when
|
||||
warn-indent is enabled.
|
||||
|
||||
Tue Sep 29 22:27:50 2015 Benoit Daloze <eregontp@gmail.com>
|
||||
|
||||
* parse.y: fix minor typo. [ci skip][fix GH-1038].
|
||||
|
|
9
parse.y
9
parse.y
|
@ -10630,6 +10630,15 @@ parser_free(void *ptr)
|
|||
prev = local->prev;
|
||||
xfree(local);
|
||||
}
|
||||
#ifndef RIPPER
|
||||
{
|
||||
token_info *ptinfo;
|
||||
while ((ptinfo = parser->token_info) != 0) {
|
||||
parser->token_info = ptinfo->next;
|
||||
xfree(ptinfo);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
xfree(ptr);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче