[Mimedefang] [PATCH] Memleak bug in mimedefang found and fixed
Martin Blapp
mb at imp.ch
Fri Jun 4 04:04:18 EDT 2004
Hi David,
The memleak is quite big. In my experiences leaked mimedefang 30MB Ram
each time you did a reload. And we do it quite often ...
The solution is quite simple and easy ;-) I just moved the setting of
PL_perl_destruct_level before the destrucor.
I expect that you release a new mimedefang version because of this :-)
In my tests it was absolutly necessary to use perl 5.8. Perl 5.6.1 does segfault
on FreeBSD in the destructor.
Martin
--- embperl.c Thu Jan 29 16:47:49 2004
+++ embperl.c Fri Jun 4 09:44:15 2004
@@ -26,6 +26,7 @@
char *argv[6];
int argc;
+ PL_perl_destruct_level = 1;
if (my_perl != NULL) {
#ifdef SAFE_EMBED_PERL
perl_destruct(my_perl);
@@ -46,7 +47,6 @@
#ifdef PERL_SET_CONTEXT
PERL_SET_CONTEXT(my_perl);
#endif
- PL_perl_destruct_level = 1;
perl_construct(my_perl);
if (subFilter) {
argv[0] = "";
Martin Blapp, <mb at imp.ch> <mbr at FreeBSD.org>
------------------------------------------------------------------
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: <finger -l mbr at freebsd.org>
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
------------------------------------------------------------------
More information about the MIMEDefang
mailing list