File bnc442857_array_delete.patch of Package bonnie++

--- bonnie++-1.03d_orig/bonnie++.cpp	2009-02-11 16:31:20.000000000 +0800
+++ bonnie++-1.03d/bonnie++.cpp	2009-02-11 16:32:50.000000000 +0800
@@ -65,18 +65,18 @@
   int chunk_size() const { return m_chunk_size; }
   bool *doExit;
   void set_chunk_size(int size)
-    { delete m_buf; m_buf = new char[size]; m_chunk_size = size; }
+    { delete [] m_buf; m_buf = new char[size]; m_chunk_size = size; }
 
   char *buf() { return m_buf; }
 
   CGlobalItems(bool *exitFlag);
-  ~CGlobalItems() { delete name; delete m_buf; }
+  ~CGlobalItems() { delete [] name; delete [] m_buf; }
 
   void decrement_and_wait(int nr_sem);
 
   void SetName(CPCCHAR path)
   {
-    delete name;
+    delete [] name;
     name = new char[strlen(path) + 15];
 #ifdef OS2
     ULONG myPid = 0;
openSUSE Build Service is sponsored by