From 70ba0c76a9c7c7699e1b2f612277d56d99828a49 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Tue, 3 Nov 2009 11:21:23 -0800 Subject: Fix uninitialized variable when reading carrier on admin down interface. --- lib/Vyatta/Interface.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Vyatta/Interface.pm') diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm index 924058a..ce909f0 100755 --- a/lib/Vyatta/Interface.pm +++ b/lib/Vyatta/Interface.pm @@ -228,6 +228,7 @@ sub carrier { or return; my $val = <$carrier>; + $val = 0 if ! defined $val # proc entry not readable on down interface chomp $val; close $carrier; return $val; -- cgit v1.2.3