From: Vincent Pit Date: Sun, 8 Feb 2009 00:47:40 +0000 (+0100) Subject: Don't call dl_unload_file twice on the same libref X-Git-Tag: v0.08~3 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=commitdiff_plain;h=272284fade82d2dc9d15ab1b564a333fb3839b19 Don't call dl_unload_file twice on the same libref --- diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index e70a912..d003528 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -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($_); + } } }