summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/LuaLoad.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/LuaLoad.cc b/src/LuaLoad.cc
index 8e634b5..b600387 100644
--- a/src/LuaLoad.cc
+++ b/src/LuaLoad.cc
@@ -28,6 +28,7 @@ struct sLua_LuaLoad {
OPENING,
CREATETASK,
WAITTASK,
+ CLEANUP,
} status;
if (L.isobject()) {
h = L.recast<LuaIO>()->getIO();
@@ -51,6 +52,9 @@ struct sLua_LuaLoad {
status = WAITTASK;
case WAITTASK:
execFile->throwError();
+ status = CLEANUP;
+ case CLEANUP:
+ h->close();
}
return 0;
}));