From 0362b70225c1a6f89e3b4f933a2d127e3638c101 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 18 Sep 2017 21:06:34 -0400 Subject: TITANIC: Fix memory leak loading star control stars --- engines/titanic/star_control/star_points1.cpp | 1 + engines/titanic/star_control/star_points2.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/engines/titanic/star_control/star_points1.cpp b/engines/titanic/star_control/star_points1.cpp index d8a0bdc405..0328743a98 100644 --- a/engines/titanic/star_control/star_points1.cpp +++ b/engines/titanic/star_control/star_points1.cpp @@ -56,6 +56,7 @@ bool CStarPoints1::initialize() { entry._z = sin(v2) * 3000000.0; } + delete stream; return true; } diff --git a/engines/titanic/star_control/star_points2.cpp b/engines/titanic/star_control/star_points2.cpp index 23cef4ce4c..aa5444f16b 100644 --- a/engines/titanic/star_control/star_points2.cpp +++ b/engines/titanic/star_control/star_points2.cpp @@ -61,6 +61,7 @@ bool CStarPoints2::initialize() { } } + delete stream; return true; } -- cgit v1.2.3