INN commit: trunk/lib (perl.c)
INN Commit
Russ_Allbery at isc.org
Sat Apr 18 12:53:40 UTC 2009
Date: Saturday, April 18, 2009 @ 05:53:39
Author: iulius
Revision: 8421
Do not try to destruct the Perl interpretor if it has not been
created yet! It can happen if innd exits at startup because
of a problem during its initialization.
Thanks to Petr Novopashenniy for having reported the bug.
Modified:
trunk/lib/perl.c
--------+
perl.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
Modified: perl.c
===================================================================
--- perl.c 2009-04-18 12:42:17 UTC (rev 8420)
+++ perl.c 2009-04-18 12:53:39 UTC (rev 8421)
@@ -47,7 +47,7 @@
CV *perl_filter_cv;
/* The embedded Perl interpretor. */
-static PerlInterpreter *PerlCode;
+static PerlInterpreter *PerlCode = NULL;
static void LogPerl(void)
@@ -230,15 +230,17 @@
/*
-** Stops using the Perl filter
+** Stops using the Perl filter.
*/
void PerlClose(void)
{
- perl_destruct(PerlCode);
- perl_free(PerlCode);
+ if (PerlCode != NULL) {
+ perl_destruct(PerlCode);
+ perl_free(PerlCode);
#ifdef PERL_SYS_TERM
- PERL_SYS_TERM();
+ PERL_SYS_TERM();
#endif
+ }
PerlFilterActive = false;
}
More information about the inn-committers
mailing list