[haiku-commits] r38052 - haiku/trunk/src/apps/packageinstaller

  • From: pulkomandy@xxxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 12 Aug 2010 15:23:40 +0200 (CEST)

Author: pulkomandy
Date: 2010-08-12 15:23:40 +0200 (Thu, 12 Aug 2010)
New Revision: 38052
Changeset: http://dev.haiku-os.org/changeset/38052

Modified:
   haiku/trunk/src/apps/packageinstaller/PackageItem.cpp
Log:
CID 1460,1461,1462: delete[] must be used to delete arrays.


Modified: haiku/trunk/src/apps/packageinstaller/PackageItem.cpp
===================================================================
--- haiku/trunk/src/apps/packageinstaller/PackageItem.cpp       2010-08-12 
13:16:40 UTC (rev 38051)
+++ haiku/trunk/src/apps/packageinstaller/PackageItem.cpp       2010-08-12 
13:23:40 UTC (rev 38052)
@@ -295,7 +295,7 @@
                        B_SWAP_BENDIAN_TO_HOST);
 
                if (*nameSize < (length + 1)) {
-                       delete *attrName;
+                       delete[] *attrName;
                        *nameSize = length + 1;
                        *attrName = new char[*nameSize];
                }
@@ -331,7 +331,7 @@
                fPackage->Seek(4, SEEK_CUR); // TODO: Check what this means
 
                if (*tempSize < *attrCSize) {
-                       delete *temp;
+                       delete[] *temp;
                        *tempSize = *attrCSize;
                        *temp = new uint8[*tempSize];
                }


Other related posts:

  • » [haiku-commits] r38052 - haiku/trunk/src/apps/packageinstaller - pulkomandy