mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-23 16:52:45 +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)
|
||||
{
|
||||
if(result->zone != NULL) {
|
||||
msgpack_zone_free(result->zone);
|
||||
}
|
||||
|
||||
int ret = msgpack_unpacker_execute(mpac);
|
||||
|
||||
if(ret < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user