mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-24 06:13:18 +00:00
Fix memory leak. Remove stream packing feature. Add errorcheck in packing.
This commit is contained in:
parent
17cbfa66ae
commit
2f09551573
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