Skip to content

Commit d7f873b

Browse files
committedJun 30, 2018
Fix a memleak before assertion in l_get_mod_storage
1 parent 2513886 commit d7f873b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

Diff for: ‎src/script/lua_api/l_storage.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ int ModApiStorage::l_get_mod_storage(lua_State *L)
3737
store->load(gamedef->getModStoragePath());
3838
gamedef->registerModStorage(store);
3939
} else {
40+
delete store;
4041
assert(false); // this should not happen
4142
}
4243

0 commit comments

Comments
 (0)
Please sign in to comment.