mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-24 17:49:45 +01:00
c: fixed a double-free problem on msgpack_unpacker_release_zone #42 (aikar++)
This commit is contained in:
parent
0d5708a01d
commit
6a9f3ae71d
@ -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…
x
Reference in New Issue
Block a user