Change 16401 by jhi@alpha on 2002/05/04 18:25:01
Storable: try to free what we allocated.
Affected files ...
.... //depot/perl/ext/Storable/Storable.xs#45 edit
Differences ...
==== //depot/perl/ext/Storable/Storable.xs#45 (text) ====
Index: perl/ext/Storable/Storable.xs
--- perl/ext/Storable/Storable.xs.~1~ Sat May 4 12:30:05 2002
+++ perl/ext/Storable/Storable.xs Sat May 4 12:30:05 2002
@@ -389,6 +389,8 @@
#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 @@
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;
+}
End of Patch.