[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, wheezy, updated. 2.5.10.3-5-g54bac3d



The following commit has been merged in the wheezy branch:
commit ce9b0ee0b6e4d7183312af4b9eab97e05a288335
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Feb 16 12:41:27 2013 +0100

    L::C::Package: Fix memory leak caused by index ref cycle
    
    In commit ff44271, indices converted their values to L::Path objects.
    Unfortunately, the "children" list for the root entry contained
    itself.  This created a ref-cycle and by extension a very nasty memory
    leak for the "archive-wide" runs.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index 1f0cf8c..7defc31 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+lintian (2.5.10.4) unstable; urgency=low
+
+  * lib/Lintian/Collect/Package.pm:
+    + [NT] Ensure the "root" entry of indices do not contain itself.
+      (Closes: #695866)
+
+ -- Niels Thykier <niels@thykier.net>  Sat, 13 Feb 2013 12:50:00 +0100
+
 lintian (2.5.10.3) unstable; urgency=low
 
   * checks/scripts{,.desc}:
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index e9ee707..ce0cef2 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -177,8 +177,10 @@ sub _fetch_index_data {
         $file{dirname} = $parent;
         $file{basename} = $base;
         $children{$parent} = [] unless exists $children{$parent};
-        push @{ $children{$parent} }, $name;
-
+        # Ensure the "root" is not its own child.  It is not really helpful
+        # from an analysis PoV and it creates ref cycles  (and by extension
+        # leaks like #695866).
+        push @{ $children{$parent} }, $name unless $parent eq $name;
     }
     @sorted = sort keys %idxh;
     foreach my $file (@sorted) {

-- 
Debian package checker


Reply to: