Skip to content

Commit

Permalink
Fix a memleak before assertion in l_get_mod_storage
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzhul committed Jun 30, 2018
1 parent 2513886 commit d7f873b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/script/lua_api/l_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit d7f873b

Please sign in to comment.