changeset 639:069da23e4507 draft

Fixes #240 and #244 - delete delete[] mismatch.
author Matt Corallo <matt@bluematt.me>
date Thu, 26 May 2011 02:24:01 +0200
parents 67772717c465
children afe517f26ae7
files src/util.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -271,7 +271,7 @@
         if (ret >= 0 && ret < limit)
             break;
         if (p != buffer)
-            delete p;
+            delete[] p;
         limit *= 2;
         p = new char[limit];
         if (p == NULL)
@@ -279,7 +279,7 @@
     }
     string str(p, p+ret);
     if (p != buffer)
-        delete p;
+        delete[] p;
     return str;
 }