mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
Fix memory leak. Remove stream packing feature. Add errorcheck in packing.
This commit is contained in:
parent
03942a1b90
commit
78db826a75
2 changed files with 73 additions and 64 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue