]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
With protocol v4, leakedbytes and leakedblocks are found in the xwhat node
authorVincent Pit <vince@profvince.com>
Sat, 19 Sep 2009 23:36:13 +0000 (01:36 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 19 Sep 2009 23:36:13 +0000 (01:36 +0200)
lib/Test/Valgrind/Parser/XML/Twig.pm

index 318e2dbb7ae20799027e9337e3abc6aec7ae62c4..29d0f9681850abb3b7980a34a9cae1b3f304b794 100644 (file)
@@ -94,7 +94,7 @@ sub handle_error {
                                        $node->kid('stack')->children('frame') ];
 
  for (qw/leakedbytes leakedblocks/) {
-  my $kid = $node->first_child($_);
+  my $kid = ($xwhat || $node)->first_child($_);
   next unless $kid;
   $data->{$_} = int $kid->text;
  }