Fix persistent memory leak in GameSession::get_demo_random_seed()
authorTobias Markus <tobbi@mozilla-uk.org>
Wed, 13 Aug 2014 15:08:44 +0000 (17:08 +0200)
committerTobias Markus <tobbi@mozilla-uk.org>
Wed, 13 Aug 2014 15:08:44 +0000 (17:08 +0200)
src/supertux/game_session.cpp

index 7a7ddb3..008f3f4 100644 (file)
@@ -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;
 }