You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by du...@apache.org on 2006/11/04 08:43:48 UTC
svn commit: r471136 - /spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
Author: duncf
Date: Fri Nov 3 23:43:48 2006
New Revision: 471136
URL: http://svn.apache.org/viewvc?view=rev&rev=471136
Log:
Bug 5166: Close temp files instead of just deleting the filehandles
when we clean up MIME parts.
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm?view=diff&rev=471136&r1=471135&r2=471136
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm Fri Nov 3 23:43:48 2006
@@ -613,7 +613,13 @@
# Ok, we've subparsed, so go ahead and remove the raw and decoded
# data because we won't need them anymore (the tree under this part
# will have that data)
+ if (ref $toparse->[0]->{'raw'} eq 'GLOB') {
+ # Make sure we close it if it's a temp file -- Bug 5166
+ close ($toparse->[0]->{'raw'});
+ }
+
delete $toparse->[0]->{'raw'};
+
delete $toparse->[0]->{'decoded'};
}
}