aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_storage.cpp
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2018-06-30 16:11:04 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2018-06-30 17:11:04 +0200
commit227c71eb76e019873b30e2d3893b68307d51d58f (patch)
treec1369f442989396f5cbd207093aeac146f888928 /src/script/lua_api/l_storage.cpp
parent9f19b7d9367c5dc2758a9d4690b091b745fc821d (diff)
downloadminetest-227c71eb76e019873b30e2d3893b68307d51d58f.tar.gz
minetest-227c71eb76e019873b30e2d3893b68307d51d58f.tar.bz2
minetest-227c71eb76e019873b30e2d3893b68307d51d58f.zip
Fix memory leaks in mod storage (#7500)
Diffstat (limited to 'src/script/lua_api/l_storage.cpp')
-rw-r--r--src/script/lua_api/l_storage.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/lua_api/l_storage.cpp b/src/script/lua_api/l_storage.cpp
index 2a2b35a31..caa1a5551 100644
--- a/src/script/lua_api/l_storage.cpp
+++ b/src/script/lua_api/l_storage.cpp
@@ -58,6 +58,11 @@ StorageRef::StorageRef(ModMetadata *object):
{
}
+StorageRef::~StorageRef()
+{
+ delete m_object;
+}
+
void StorageRef::create(lua_State *L, ModMetadata *object)
{
StorageRef *o = new StorageRef(object);