mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-18 20:38:00 +01:00
oops. fixed memory leaks in stream unpacker.
This commit is contained in:
parent
580fbe77e9
commit
ffef0a0b6f
@ -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…
x
Reference in New Issue
Block a user