From 77172463a30a5837a0a53ddfd7fb578343d2a33f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 26 May 2011 02:24:01 +0200 Subject: [PATCH] Fixes #240 and #244 - delete delete[] mismatch. --- src/util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index 4e93f625..61991092 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; }