The following commit has been merged in the master branch:
commit 49a03313996b99c44b575dddef3993348cb8da52
Author: Stephen M. Webb <[email protected]>
Date:   Fri Dec 2 15:54:36 2011 -0500

    Fixed a mismatech delete error from valgrind.

diff --git a/debian/changelog b/debian/changelog
index 106dada..8d22008 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,9 @@ viruskiller (1.0-1.dfsg.1-2) UNRELEASED; urgency=low
   * Fixed reference in missing-pak-file error message (Closes: #329734).
   * Fixed startup problems from too few directories in $HOME
     (Closes: #628166) (LP: #502978).
+  * Fixed a mismatech delete error from valgrind.
 
- -- Stephen M. Webb <[email protected]>  Fri, 02 Dec 2011 14:14:01 
-0500
+ -- Stephen M. Webb <[email protected]>  Fri, 02 Dec 2011 15:54:02 
-0500
 
 viruskiller (1.0-1.dfsg.1-1) unstable; urgency=low
 
diff --git a/debian/patches/0010-mismatched-delete.patch 
b/debian/patches/0010-mismatched-delete.patch
new file mode 100644
index 0000000..832c870
--- /dev/null
+++ b/debian/patches/0010-mismatched-delete.patch
@@ -0,0 +1,51 @@
+--- a/src/CEngine.cpp
++++ b/src/CEngine.cpp
+@@ -68,9 +68,9 @@
+       deleteWidgets();
+ 
+       debug(("engine: free databuffer\n"));
+-      delete dataBuffer;
++      delete[] dataBuffer;
+       debug(("engine: free binarybuffer\n"));
+-      delete binaryBuffer;
++      delete[] binaryBuffer;
+ 
+       debug(("Clearing Define List...\n"));
+       defineList.clear();
+@@ -268,16 +268,12 @@
+ {
+       if (fileType == PAK_DATA)
+       {
+-              if (dataBuffer != NULL)
+-                      delete[] dataBuffer;
+-
++              delete[] dataBuffer;
+               dataBuffer = NULL;
+       }
+       else
+       {
+-              if (binaryBuffer != NULL)
+-                      delete[] binaryBuffer;
+-
++              delete[] binaryBuffer;
+               binaryBuffer = NULL;
+       }
+ 
+@@ -340,14 +336,11 @@
+ 
+ bool Engine::loadData(char *filename)
+ {
+-      if (dataBuffer != NULL)
+-      {
+-              delete[] dataBuffer;
+-              dataBuffer = NULL;
+-      }
++      delete[] dataBuffer;
++      dataBuffer = NULL;
+       
+       #if USEPAK
+-              return unpack(filename, PAK_DATA);
++      return unpack(filename, PAK_DATA);
+       #endif
+ 
+       FILE *fp;
diff --git a/debian/patches/series b/debian/patches/series
index 79321ea..03833f9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ link-libz.patch
 0007-link-as-needed.patch
 0008-missing-pak-error-fix.patch
 0009-start-with-fewer-directories.patch
+0010-mismatched-delete.patch

-- 
game about viruses invading your computer

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to