diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index be1433b12..7ffbb574e 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -11,6 +11,7 @@ - fixed #9511: Subcategories displayed incorrectly (Henry Tang, Long Term Results B.v.) - fixed #4137: Calendar Search page has head tags in body - fixed: HTTP Proxy doesn't serve new content to visitors + - fixed: Exporting to static files can leak large amounts of memory 7.6.8 - added #!/usr/bin/env perl to all utility scripts diff --git a/lib/WebGUI/AssetExportHtml.pm b/lib/WebGUI/AssetExportHtml.pm index a7a92bb74..3a6b8370f 100644 --- a/lib/WebGUI/AssetExportHtml.pm +++ b/lib/WebGUI/AssetExportHtml.pm @@ -299,6 +299,8 @@ sub exportAsHtml { my $message = sprintf( $i18n->get('bad user privileges') . "\n") . $asset->getUrl; $self->session->output->print($message); } + $exportSession->var->end; + $exportSession->close; next; } @@ -307,12 +309,16 @@ sub exportAsHtml { if( !$quiet ) { $self->session->output->print("$fullPath skipped, not exportable
"); } + $exportSession->var->end; + $exportSession->close; next; } # tell the user which asset we're exporting. unless ($quiet) { my $message = sprintf $i18n->get('exporting page'), $fullPath; + $exportSession->var->end; + $exportSession->close; $self->session->output->print($message); } @@ -322,6 +328,8 @@ sub exportAsHtml { $returnCode = 0; $message = $@; $self->session->output->print("could not export asset with URL " . $asset->getUrl . ": $@"); + $exportSession->var->end; + $exportSession->close; return ($returnCode, $message); } @@ -332,6 +340,8 @@ sub exportAsHtml { $returnCode = 0; $message = $@; $self->session->output->print("failed to export asset collateral for URL " . $asset->getUrl . ": $@"); + $exportSession->var->end; + $exportSession->close; return ($returnCode, $message); }