]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Don't call dl_unload_file twice on the same libref
authorVincent Pit <vince@profvince.com>
Sun, 8 Feb 2009 00:47:40 +0000 (01:47 +0100)
committerVincent Pit <vince@profvince.com>
Sun, 8 Feb 2009 08:53:13 +0000 (09:53 +0100)
lib/Test/Valgrind.pm

index e70a912d2d089512750322f9a8d84fb5165daadb..d003528be0d3158d2efc541426d7547aa5d05f87 100644 (file)
@@ -233,7 +233,10 @@ sub import {
 
 END {
  if ($run and eval { require DynaLoader; 1 }) {
-  DynaLoader::dl_unload_file($_) for @DynaLoader::dl_librefs;
+  for (@DynaLoader::dl_librefs) {
+   next unless defined;
+   undef $_ if DynaLoader::dl_unload_file($_);
+  }
  }
 }