Index: openacs-4/contrib/packages/irc-logger/tcl/irc-logger-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/irc-logger/tcl/irc-logger-procs.tcl,v
diff -u -r1.6 -r1.6.4.1
--- openacs-4/contrib/packages/irc-logger/tcl/irc-logger-procs.tcl	29 May 2003 19:30:01 -0000	1.6
+++ openacs-4/contrib/packages/irc-logger/tcl/irc-logger-procs.tcl	31 Mar 2004 22:39:21 -0000	1.6.4.1
@@ -72,6 +72,9 @@
 
     # Parse the RDF log and the XSL style sheet into DOM trees.
 
+    # Return the empty string if the XSL style could not be applied.
+    set text ""
+
     if {![catch {set rdf [dom parse [read [open $rdf_log r]]]} error_msg]} {
         if {![catch {set xsl [dom parse [read [open $xsl_style r]]]} error_msg]} {
     
@@ -82,24 +85,23 @@
                 # Serialize the HTML DOM tree as HTML text
 
 		set text [$html asHTML]
-                $html delete
-                return $text
 
             } else {
                 ns_log warning "irc::logger::apply_xslt - Could not transform RDF log '$rdf_log' to HTML with XSL sheet '$xsl_style': $error_msg"
             }
-            $rdf delete
-            $xsl delete
         } else {
             ns_log warning "irc::logger::apply_xslt - Could not parse $xsl_style: $error_msg"
         }
     } else {
         ns_log warning "irc::logger::apply_xslt - Could not parse $rdf_log: $error_msg"
     }
+    
+    # clean up the dom references, otherwise we have a mem leak.
+    $rdf delete
+    $xsl delete
+    $html delete
 
-    # Return the empty string if the XSL style could not be applied.
-
-    return ""
+    return $text
 }
 
 ad_proc -public irc::logger::rotate_logs {