mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
c: fixed a double-free problem on msgpack_unpacker_release_zone #42 (aikar++)
This commit is contained in:
parent
0d5708a01d
commit
6a9f3ae71d
1 changed files with 4 additions and 3 deletions
|
|
@ -335,10 +335,11 @@ msgpack_zone* msgpack_unpacker_release_zone(msgpack_unpacker* mpac)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
msgpack_zone* old = mpac->z;
|
||||
mpac->z = r;
|
||||
msgpack_zone old = *mpac->z;
|
||||
*mpac->z = *r;
|
||||
*r = old;
|
||||
|
||||
return old;
|
||||
return r;
|
||||
}
|
||||
|
||||
void msgpack_unpacker_reset_zone(msgpack_unpacker* mpac)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue