aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2017-09-20 19:21:42 +0200
committerBastien Bouclet2017-09-22 07:06:20 +0200
commitddac55699d69be8c02b724b413fb92d1a93b7257 (patch)
treeafc840662fc5eec428643e183477daafbad5ead6 /engines
parent9c2cfee4e53f5e678d37b33cdcb354782932b10c (diff)
downloadscummvm-rg350-ddac55699d69be8c02b724b413fb92d1a93b7257.tar.gz
scummvm-rg350-ddac55699d69be8c02b724b413fb92d1a93b7257.tar.bz2
scummvm-rg350-ddac55699d69be8c02b724b413fb92d1a93b7257.zip
SWORD25: Fix leaking the lua state MemoryWriteStreamDynamic buffer
Diffstat (limited to 'engines')
-rw-r--r--engines/sword25/script/luascript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sword25/script/luascript.cpp b/engines/sword25/script/luascript.cpp
index 3aca6676ac..1a83fc9c82 100644
--- a/engines/sword25/script/luascript.cpp
+++ b/engines/sword25/script/luascript.cpp
@@ -395,7 +395,7 @@ bool LuaScriptEngine::persist(OutputPersistenceBlock &writer) {
lua_getglobal(_state, "_G");
// Lua persists and stores the data in a WriteStream
- Common::MemoryWriteStreamDynamic writeStream;
+ Common::MemoryWriteStreamDynamic writeStream(DisposeAfterUse::YES);
Lua::persistLua(_state, &writeStream);
// Persistenzdaten in den Writer schreiben.