From babc7d7ef63d65a1c609d4b43d4709aab30833e7 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 28 Jun 2017 18:19:20 -0700 Subject: [PATCH] jsminplus: Fix JSNode memory leak from 'continue' statements During parsing of scripts containing a 'continue' statement, the JSNode for that statements, and all containing blocks (e.g. conditional blocks, for-loop/white-loop statements , etc.) were being held in memory indefinitely. Bug: T31784 Change-Id: Id7006c264a470ba665434f6f275e49a1516b73ae --- includes/libs/jsminplus.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/libs/jsminplus.php b/includes/libs/jsminplus.php index 40f22c5efb..7feac7d11a 100644 --- a/includes/libs/jsminplus.php +++ b/includes/libs/jsminplus.php @@ -973,8 +973,6 @@ class JSParser } while (!$ss[$i]->isLoop && ($tt != KEYWORD_BREAK || $ss[$i]->type != KEYWORD_SWITCH)); } - - $n->target = $ss[$i]; break; case KEYWORD_TRY: -- 2.20.1