mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-28 18:37:51 +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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
msgpack_zone* old = mpac->z;
|
msgpack_zone old = *mpac->z;
|
||||||
mpac->z = r;
|
*mpac->z = *r;
|
||||||
|
*r = old;
|
||||||
|
|
||||||
return old;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void msgpack_unpacker_reset_zone(msgpack_unpacker* mpac)
|
void msgpack_unpacker_reset_zone(msgpack_unpacker* mpac)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user