git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
a9ea3cd
)
Fixes #240 and #244 - delete delete[] mismatch.
author
Matt Corallo
<matt@bluematt.me>
Thu, 26 May 2011 00:24:01 +0000 (
02:24
+0200)
committer
Matt Corallo
<matt@bluematt.me>
Thu, 26 May 2011 00:24:01 +0000 (
02:24
+0200)
src/util.cpp
patch
|
blob
|
history
diff --git
a/src/util.cpp
b/src/util.cpp
index
4e93f62
..
6199109
100644
(file)
--- 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;
}