summaryrefslogtreecommitdiff
path: root/ext/Storable/Storable.xs
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-04 18:25:01 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-04 18:25:01 +0000
commit8e8f246af5d39ba29174ca7db7e1998f5c0abb88 (patch)
tree07190215dc7399581c08fc93508120dd54c36b61 /ext/Storable/Storable.xs
parentfbe3e8bd55fa2f6353b01a5d78942dd4fd7f3cfc (diff)
downloadperl-8e8f246af5d39ba29174ca7db7e1998f5c0abb88.tar.gz
(retracted by #16415) Storable: try to free what we allocated.
p4raw-id: //depot/perl@16401
Diffstat (limited to 'ext/Storable/Storable.xs')
-rw-r--r--ext/Storable/Storable.xs15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index 05705c0877..38843f6334 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;
+}