summaryrefslogtreecommitdiff
path: root/cpp/unpack.cpp
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:56 +0000
committerfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:56 +0000
commit94cbe54cf377f16bcc18b80d8b6f81eefd50e723 (patch)
tree07d094756667b056278a5c65834b1e07ccee9da0 /cpp/unpack.cpp
parent7e6b55a71805dabb2ad82bf6802ea81f36bc911a (diff)
downloadmsgpack-python-94cbe54cf377f16bcc18b80d8b6f81eefd50e723.tar.gz
lang/c/msgpack: C++ binding: added bench.cpp
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@57 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
Diffstat (limited to 'cpp/unpack.cpp')
-rw-r--r--cpp/unpack.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/unpack.cpp b/cpp/unpack.cpp
index d484593..807ded9 100644
--- a/cpp/unpack.cpp
+++ b/cpp/unpack.cpp
@@ -85,8 +85,8 @@ void unpacker::expand_buffer(size_t len)
void* tmp = malloc(next_size);
if(!tmp) { throw std::bad_alloc(); }
memcpy(tmp, m_buffer, m_used);
-
free(m_buffer);
+
m_buffer = tmp;
m_free = next_size - m_used;