summaryrefslogtreecommitdiff
path: root/python/msgpack/pack.h
diff options
context:
space:
mode:
authorNaoki INADA <inada-n@klab.jp>2009-07-01 20:55:24 +0900
committerNaoki INADA <inada-n@klab.jp>2009-07-01 20:55:24 +0900
commit78db826a75d9f091f2175ace5f2cd9cb81c0f115 (patch)
tree5e2764031cbcb19f9b6f93c6ea16b90d4f7c6585 /python/msgpack/pack.h
parent03942a1b9020b00bf47e93b7d5ec606e8160c054 (diff)
downloadmsgpack-python-78db826a75d9f091f2175ace5f2cd9cb81c0f115.tar.gz
Fix memory leak. Remove stream packing feature. Add errorcheck in packing.
Diffstat (limited to 'python/msgpack/pack.h')
-rw-r--r--python/msgpack/pack.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/msgpack/pack.h b/python/msgpack/pack.h
index d7e0867..58f021e 100644
--- a/python/msgpack/pack.h
+++ b/python/msgpack/pack.h
@@ -72,7 +72,7 @@ static inline int msgpack_pack_write(msgpack_packer* pk, const char *data, size_
if (len + l > bs) {
bs = (len + l) * 2;
- buf = realloc(pk->buf, bs);
+ buf = realloc(buf, bs);
if (!buf) return -1;
}
memcpy(buf + len, data, l);