aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Corallo <matt@bluematt.me>2011-05-26 02:24:01 +0200
committerMatt Corallo <matt@bluematt.me>2011-05-26 02:24:01 +0200
commit77172463a30a5837a0a53ddfd7fb578343d2a33f (patch)
treef08f23b9a89eea7802855cef4845dcf842e3e008
parenta9ea3cd76db24e09a8e564db5a156b6fb58a72ad (diff)
Fixes #240 and #244 - delete delete[] mismatch.
-rw-r--r--src/util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 4e93f625de..6199109289 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -271,7 +271,7 @@ string strprintf(const char* format, ...)
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 strprintf(const char* format, ...)
}
string str(p, p+ret);
if (p != buffer)
- delete p;
+ delete[] p;
return str;
}