From: Jarkko Hietaniemi Date: Sat, 4 May 2002 18:25:01 +0000 (+0000) Subject: (retracted by #16415) Storable: try to free what we allocated. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8e8f246af5d39ba29174ca7db7e1998f5c0abb88;p=p5sagit%2Fp5-mst-13.2.git (retracted by #16415) Storable: try to free what we allocated. p4raw-id: //depot/perl@16401 --- diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index 05705c0..38843f6 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -389,6 +389,8 @@ static stcxt_t *Context_ptr = &Context; #endif /* MULTIPLICITY || PERL_OBJECT || PERL_CAPI */ +XS(XS_Storable_END); /* free perinterp_sv and kbuf */ + /* * KNOWN BUG: * Croaking implies a memory leak, since we don't use setjmp/longjmp @@ -5426,3 +5428,16 @@ is_storing() int is_retrieving() +void +END() +PPCODE: +{ + dSTCXT; +#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || defined(PERL_CAPI) + Safefree(INT2PTR(stcxt_t*, perinterp_sv)); + perinterp_sv = 0; +#endif + Safefree(kbuf); + kbuf = 0; + ksiz = 0; +}