projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2513886
)
Fix a memleak before assertion in l_get_mod_storage
author
Loic Blot
<loic.blot@unix-experience.fr>
Sat, 30 Jun 2018 08:32:02 +0000
(10:32 +0200)
committer
Loic Blot
<loic.blot@unix-experience.fr>
Sat, 30 Jun 2018 08:32:02 +0000
(10:32 +0200)
src/script/lua_api/l_storage.cpp
patch
|
blob
|
history
diff --git
a/src/script/lua_api/l_storage.cpp
b/src/script/lua_api/l_storage.cpp
index 280ec7266f6a55ba04dc75ef04570814c5d1d0c2..2a2b35a31e10ec1aae90b0403afe1e30de2886d0 100644
(file)
--- 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
}