aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2018-06-30 10:32:02 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2018-06-30 10:32:02 +0200
commitd7f873bc8d8edc73cee1c40db055b038febc4e1b (patch)
treee11bd4f6696eb935b5ce62a66b417a96b5bde2e8 /src
parent2513886969ec3a128820e9fcef2d046142f010fa (diff)
downloadminetest-d7f873bc8d8edc73cee1c40db055b038febc4e1b.tar.gz
minetest-d7f873bc8d8edc73cee1c40db055b038febc4e1b.tar.bz2
minetest-d7f873bc8d8edc73cee1c40db055b038febc4e1b.zip
Fix a memleak before assertion in l_get_mod_storage
Diffstat (limited to 'src')
-rw-r--r--src/script/lua_api/l_storage.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/lua_api/l_storage.cpp b/src/script/lua_api/l_storage.cpp
index 280ec7266..2a2b35a31 100644
--- a/src/script/lua_api/l_storage.cpp
+++ b/src/script/lua_api/l_storage.cpp
@@ -37,6 +37,7 @@ int ModApiStorage::l_get_mod_storage(lua_State *L)
store->load(gamedef->getModStoragePath());
gamedef->registerModStorage(store);
} else {
+ delete store;
assert(false); // this should not happen
}