diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-08-26 11:01:29 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-08-26 11:01:29 +0200 |
commit | 00d7ea164e58c0f7a3f4a305bd98cb92dac368a4 (patch) | |
tree | d5e8aa19a66876a34a54723dbd8d6061431a6a33 /server/src/luascript.cc | |
parent | b638a2b35bbe93d893059b35664974fcd4543b1d (diff) |
Fix memoryleak.
Diffstat (limited to 'server/src/luascript.cc')
-rw-r--r-- | server/src/luascript.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/src/luascript.cc b/server/src/luascript.cc index 22b0e94..511ba91 100644 --- a/server/src/luascript.cc +++ b/server/src/luascript.cc @@ -151,6 +151,14 @@ LUAScript::LUAScript() L = NULL; } +LUAScript::~LUAScript() +{ + if(L) { + lua_close(L); + L = NULL; + } +} + void LUAScript::init() throw(Exception) { |