From: Tobias Markus Date: Wed, 13 Aug 2014 15:08:44 +0000 (+0200) Subject: Fix persistent memory leak in GameSession::get_demo_random_seed() X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=368531e49f52a2549333288547316430af3f2896;p=supertux.git Fix persistent memory leak in GameSession::get_demo_random_seed() --- diff --git a/src/supertux/game_session.cpp b/src/supertux/game_session.cpp index 7a7ddb37f..008f3f44f 100644 --- a/src/supertux/game_session.cpp +++ b/src/supertux/game_session.cpp @@ -184,6 +184,8 @@ GameSession::get_demo_random_seed(const std::string& filename) else log_info << "Demo file contains no random number" << std::endl; } + delete test_stream; + test_stream = nullptr; return 0; }