[Scummvm-git-logs] scummvm master -> 5f426286b8567891381bbfd4a0dc08acbe6efad9

sdelamarre noreply at scummvm.org
Mon Nov 10 09:15:47 UTC 2025


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

Summary:
5f426286b8 GOB: Fix a new[]/delete[] mismatch (Coverity 1642920)


Commit: 5f426286b8567891381bbfd4a0dc08acbe6efad9
    https://github.com/scummvm/scummvm/commit/5f426286b8567891381bbfd4a0dc08acbe6efad9
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-11-10T10:15:12+01:00

Commit Message:
GOB: Fix a new[]/delete[] mismatch (Coverity 1642920)

Changed paths:
    engines/gob/video_v6.cpp


diff --git a/engines/gob/video_v6.cpp b/engines/gob/video_v6.cpp
index aad18a26a00..7a31529caa2 100644
--- a/engines/gob/video_v6.cpp
+++ b/engines/gob/video_v6.cpp
@@ -90,7 +90,7 @@ void Video_v6::drawPacked(const byte *sprBuf, int16 x, int16 y, Surface &surfDes
 		int32 uncompresedSize = 0;
 		byte *uncompressedData = DataIO::unpack(srcData, INT32_MAX, uncompresedSize, 1);
 		drawYUVData(uncompressedData, surfDesc, width, height, x, y);
-		delete uncompressedData;
+		delete[] uncompressedData;
 	} else if (dataType == 3) {
 		// Compressed high-color RGB data
 		int32 uncompresesSize = 0;
@@ -119,7 +119,7 @@ void Video_v6::drawPacked(const byte *sprBuf, int16 x, int16 y, Surface &surfDes
 		if (!conversionOk)
 			warning("drawPacked: error when cross-blitting from compressed RGB high-color data");
 
-		delete uncompressedData;
+		delete[] uncompressedData;
 	} else {
 		warning("drawPacked: unknown compression type %d", dataType);
 	}




More information about the Scummvm-git-logs mailing list