Fix memory leak in msgpack_unpacker_next

This commit is contained in:
Thiago de Arruda 2014-09-06 20:01:52 -03:00
parent 86ad026f11
commit a186725213

View File

@ -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) {