Velocity Reviews

Velocity Reviews (
-   Perl Misc (
-   -   Use of freed value in iteration (

Stuart Kendrick 08-05-2004 01:43 PM

Use of freed value in iteration
hi folks,

i don't understand why Perl bombs with 'Use of freed value in
iteration' in my code below... i don't see where i'm modifying the
contents of %esx in my loop. can anyone see what i'm missing?

guru> cat test

use strict;
use warnings;
use SNMP;

my $obj = "sysDescr";
my $read = "public";
my ($sess, $val, $vb);

my %esx = ( "" => "b2-esx",
"" => "a1-esx",
"" => "a2-esx",
"" => "a3-esx",

for my $addr (keys %esx) {
print "Processing $addr\n";
$sess = new SNMP::Session ( Community => $read,
DestHost => $addr,
$vb = new SNMP::Varbind([$obj]);
$val = $sess->bulkwalk('0', '10000', $vb);
print "Finished $addr\n";

guru> ./test
Use of freed value in iteration at ./test line 24.


-line 24 is the 'print "Finished $addr\n";' line.

-naturally, im my real code, i'm not performing snmpbulkwalks on
sysDescr ... but this snippet replicates the problem and produces much
simpler output.

-perl 5.8.5, net-snmp 5.0.9


stuart kendrick

All times are GMT. The time now is 09:43 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.