mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-15 07:14:48 +02:00
When the original PR was applied, the resource leak had been fixed, but a dual free problem had been happened. When msgpack_unpacker_next returns MSGPACK_UNPACK_CONTINUE, msgpack_unpacked::zone is not replaced. Then mespack_zone_free is called twice with the same object. msgpack_unpacked_destroy frees msgpack::zone when it is not NULL and set it to NULL. Also, fixed memory leak (msgpack_sbuffer) on the test code.
This commit is contained in:
@@ -110,5 +110,5 @@ TEST(streaming, basic)
|
||||
|
||||
msgpack_unpacker_destroy(&pac);
|
||||
msgpack_unpacked_destroy(&result);
|
||||
msgpack_sbuffer_free(buffer);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user