mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-06-27 14:46:04 +02:00
Merge pull request #113 from tarruda/fix-memory-leak
Fix memory leak in msgpack_unpacker_next
This commit is contained in:
commit
7ebdb63131
@ -492,6 +492,10 @@ void msgpack_unpacker_reset(msgpack_unpacker* mpac)
|
|||||||
|
|
||||||
msgpack_unpack_return msgpack_unpacker_next(msgpack_unpacker* mpac, msgpack_unpacked* result)
|
msgpack_unpack_return msgpack_unpacker_next(msgpack_unpacker* mpac, msgpack_unpacked* result)
|
||||||
{
|
{
|
||||||
|
if(result->zone != NULL) {
|
||||||
|
msgpack_zone_free(result->zone);
|
||||||
|
}
|
||||||
|
|
||||||
int ret = msgpack_unpacker_execute(mpac);
|
int ret = msgpack_unpacker_execute(mpac);
|
||||||
|
|
||||||
if(ret < 0) {
|
if(ret < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user