Skip to content

Commit

Permalink
Properly delete games in custom deleter
Browse files Browse the repository at this point in the history
This fixes saving replays and a memory leak.
  • Loading branch information
loonycyborg committed Nov 13, 2016
1 parent 6247f10 commit 43f2285
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/server/server.cpp
Expand Up @@ -1163,6 +1163,7 @@ void server::cleanup_game(game* game_ptr)
LOG_SERVER << "Could not find game (" << game_ptr->id()
<< ") to delete in games_and_users_list_.\n";
}
delete game_ptr;
}

void server::handle_join_game(socket_ptr socket, simple_wml::node& join)
Expand Down

0 comments on commit 43f2285

Please sign in to comment.