From c08922c411c60b4a092f1695aa3bf2d754369b99 Mon Sep 17 00:00:00 2001 From: batrick Date: Sat, 10 Jul 2010 06:03:15 +0000 Subject: [PATCH] Reset environment after creating new script thread. (This may fix problems with some memory not being reclaimed.) --- nse_main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/nse_main.lua b/nse_main.lua index b61e9a367..3f3000d6d 100644 --- a/nse_main.lua +++ b/nse_main.lua @@ -227,6 +227,7 @@ do -- same Lua thread the action and rule functions will execute in. local co = create(main); local s, value, rule_return = resume(co, ...); + setfenv(file_closure, _G); -- reset the environment if s and value ~= unique_value then print_debug(1, "A thread for %s yielded unexpectedly in the file or %s function:\n%s\n",