Skip to content

Commit

Permalink
Fix continue in a loop body leaking heap-allocated variables. (bug 63…
Browse files Browse the repository at this point in the history
…70, r=fyren)
  • Loading branch information
David Anderson committed May 27, 2015
1 parent 8cb2fcd commit b491345
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sourcepawn/compiler/sc1.cpp
Expand Up @@ -7253,6 +7253,7 @@ static int dofor(void)
save_nestlevel=nestlevel;
save_endlessloop=endlessloop;
pushstacklist();
pushheaplist();

addwhile(wq);
skiplab=getlabel();
Expand Down Expand Up @@ -7350,6 +7351,8 @@ static int dofor(void)
setlabel(wq[wqEXIT]);
delwhile();

popheaplist();

assert(nestlevel>=save_nestlevel);
if (nestlevel>save_nestlevel) {
/* Clean up the space and the symbol table for the local
Expand Down

0 comments on commit b491345

Please sign in to comment.