Changeset 279 for MMagic

Show
Ignore:
Timestamp:
07/21/11 22:35:23 (10 months ago)
Author:
usu
Message:

* MMagic.pm (checktype_byfilename): Fixed memory leak.

Location:
MMagic/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • MMagic/trunk/ChangeLog

    r278 r279  
     12011-07-21  Yukio USUDA  <usu@namazu.org> 
     2 
     3        * MMagic.pm (checktype_byfilename): Fixed memory leak. 
     4 
    152007-10-02  NOKUBI Takatsugu  <knok@daionet.gr.jp> 
    26 
  • MMagic/trunk/MMagic.pm

    r278 r279  
    303303use FileHandle; 
    304304use strict; 
     305use Scalar::Util; 
    305306 
    306307use vars qw( 
     
    738739    $fname =~ s/^.*\///; 
    739740    for my $regex (keys %{$self->{FILEEXTS}}) { 
     741        Scalar::Util::weaken($self->{FILEEXTS}); 
    740742        if ($fname =~ /$regex/i) { 
    741743            if ((defined $type && $type !~ /;/) || (! defined $type)) {