mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
oops. fixed memory leaks in stream unpacker.
This commit is contained in:
parent
580fbe77e9
commit
ffef0a0b6f
2 changed files with 13 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ XS(xs_unpacker_execute_limit);
|
|||
XS(xs_unpacker_is_finished);
|
||||
XS(xs_unpacker_data);
|
||||
XS(xs_unpacker_reset);
|
||||
XS(xs_unpacker_destroy);
|
||||
|
||||
XS(boot_Data__MessagePack) {
|
||||
dXSARGS;
|
||||
|
|
@ -35,6 +36,6 @@ XS(boot_Data__MessagePack) {
|
|||
newXS("Data::MessagePack::Unpacker::is_finished", xs_unpacker_is_finished, __FILE__);
|
||||
newXS("Data::MessagePack::Unpacker::data", xs_unpacker_data, __FILE__);
|
||||
newXS("Data::MessagePack::Unpacker::reset", xs_unpacker_reset, __FILE__);
|
||||
|
||||
newXS("Data::MessagePack::Unpacker::DESTROY", xs_unpacker_destroy, __FILE__);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -288,3 +288,14 @@ XS(xs_unpacker_reset) {
|
|||
XSRETURN(0);
|
||||
}
|
||||
|
||||
XS(xs_unpacker_destroy) {
|
||||
dXSARGS;
|
||||
if (items != 1) {
|
||||
Perl_croak(aTHX_ "Usage: $unpacker->DESTROY()");
|
||||
}
|
||||
|
||||
UNPACKER(ST(0), mp);
|
||||
Safefree(mp);
|
||||
|
||||
XSRETURN(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue