mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-19 04:33:27 +02:00
reverts variable-length stack: avoids memory leak
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user