reverts variable-length stack: avoids memory leak

This commit is contained in:
frsyuki
2010-04-22 14:46:54 +09:00
parent 354af69f62
commit d24193630e
4 changed files with 17 additions and 16 deletions

View File

@@ -53,7 +53,6 @@ struct template_context;
typedef struct template_context msgpack_unpack_t;
static void template_init(msgpack_unpack_t* u);
static void template_destroy(msgpack_unpack_t* u);
static SV* template_data(msgpack_unpack_t* u);
@@ -143,7 +142,6 @@ SV* _msgpack_unpack(SV* data, int limit) {
mp.user.source = &PL_sv_undef;
obj = template_data(&mp);
template_destroy(&mp);
if(ret < 0) {
Perl_croak(aTHX_ "parse error.");
@@ -316,7 +314,6 @@ XS(xs_unpacker_destroy) {
}
UNPACKER(ST(0), mp);
template_destroy(mp);
Safefree(mp);
XSRETURN(0);