oops. fixed memory leaks in stream unpacker.

This commit is contained in:
Tokuhiro Matsuno
2009-07-02 17:42:28 +09:00
parent 580fbe77e9
commit ffef0a0b6f
2 changed files with 13 additions and 1 deletions

View 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);
}