[Scummvm-git-logs] scummvm master -> d886c8e63ebfe0aaa1bfef3d34453238504af083

somaen noreply at scummvm.org
Mon Sep 26 22:32:47 UTC 2022


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fec908a910 GRIM: Initialize more members of GrimEngine
d886c8e63e GRIM: Fix leak in Overlay


Commit: fec908a91058349a529116b5163144a917a54cf3
    https://github.com/scummvm/scummvm/commit/fec908a91058349a529116b5163144a917a54cf3
Author: Einar Johan Trøan Sømåen (somaen at scummvm.org)
Date: 2022-09-27T00:32:37+02:00

Commit Message:
GRIM: Initialize more members of GrimEngine

Partially fixes COVERITY 1009908

Changed paths:
    engines/grim/grim.h


diff --git a/engines/grim/grim.h b/engines/grim/grim.h
index 6a5997b33ad..c9f6f3fe9b8 100644
--- a/engines/grim/grim.h
+++ b/engines/grim/grim.h
@@ -225,8 +225,8 @@ protected:
 	virtual void storeSaveGameMetadata(SaveGame *state);
 	virtual void storeSaveGameImage(SaveGame *savedState);
 
-	bool _savegameLoadRequest;
-	bool _savegameSaveRequest;
+	bool _savegameLoadRequest = false;
+	bool _savegameSaveRequest = false;
 	Common::String _savegameFileName;
 	SaveGame *_savedState;
 	bool _justSaveLoaded;
@@ -238,16 +238,16 @@ protected:
 	bool _flipEnable;
 	char _fps[8];
 	bool _doFlip;
-	bool _refreshShadowMask;
-	bool _shortFrame;
-	bool _setupChanged;
+	bool _refreshShadowMask = false;
+	bool _shortFrame = false;
+	bool _setupChanged = true;
 	// This holds the name of the setup in which the movie must be drawed
 	Common::String _movieSetup;
 
-	unsigned _frameStart, _frameTime, _movieTime;
-	int _prevSmushFrame;
-	unsigned int _frameCounter;
-	unsigned int _lastFrameTime;
+	unsigned _frameStart = 0, _frameTime = 0, _movieTime = 0;
+	int _prevSmushFrame = 0;
+	unsigned int _frameCounter = 0;
+	unsigned int _lastFrameTime = 0;
 	unsigned _speedLimitMs;
 	bool _showFps;
 	bool _softRenderer;
@@ -256,7 +256,7 @@ protected:
 	bool *_controlsState;
 	float *_joyAxisPosition;
 
-	bool _changeHardwareState;
+	bool _changeHardwareState = false;
 
 	Actor *_selectedActor;
 	Iris *_iris;
@@ -280,14 +280,14 @@ protected:
 	bool _conceptEnabled[kNumConcepts];
 
 	Common::String _saveMeta1;
-	int _saveMeta2;
+	int _saveMeta2 = 0;
 	Common::String _saveMeta3;
 
 	Commentary *_commentary;
 
 public:
-	int _cursorX;
-	int _cursorY;
+	int _cursorX = 0;
+	int _cursorY = 0;
 };
 
 extern GrimEngine *g_grim;


Commit: d886c8e63ebfe0aaa1bfef3d34453238504af083
    https://github.com/scummvm/scummvm/commit/d886c8e63ebfe0aaa1bfef3d34453238504af083
Author: Einar Johan Trøan Sømåen (somaen at scummvm.org)
Date: 2022-09-27T00:32:37+02:00

Commit Message:
GRIM: Fix leak in Overlay

Fixes COVERITY: 1436013

Changed paths:
    engines/grim/remastered/overlay.cpp


diff --git a/engines/grim/remastered/overlay.cpp b/engines/grim/remastered/overlay.cpp
index 5b499ca09ce..2655ceee737 100644
--- a/engines/grim/remastered/overlay.cpp
+++ b/engines/grim/remastered/overlay.cpp
@@ -36,6 +36,7 @@ Overlay::Overlay(const Common::String &filename, Common::SeekableReadStream *dat
 }
 
 Overlay::~Overlay() {
+	delete _material;
 }
 
 void Overlay::draw() {




More information about the Scummvm-git-logs mailing list