mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Fix a memleak before assertion in l_get_mod_storage
This commit is contained in:
@@ -37,6 +37,7 @@ int ModApiStorage::l_get_mod_storage(lua_State *L)
|
|||||||
store->load(gamedef->getModStoragePath());
|
store->load(gamedef->getModStoragePath());
|
||||||
gamedef->registerModStorage(store);
|
gamedef->registerModStorage(store);
|
||||||
} else {
|
} else {
|
||||||
|
delete store;
|
||||||
assert(false); // this should not happen
|
assert(false); // this should not happen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user